What are the potential risks of using virtual() to execute Perl scripts in PHP?

Using virtual() to execute Perl scripts in PHP can pose security risks such as command injection vulnerabilities if user input is not properly sanitized. To mitigate this risk, it is recommended to use the escapeshellarg() function to properly escape any user input before passing it to the virtual() function.

$perl_script = escapeshellarg('/path/to/perl_script.pl');
virtual("/usr/bin/perl $perl_script");