How can I call a PHP script from a Perl script and get its output as a variable?
The reverse of this question, but the same answer.
Use backticks or the qx operator:
qx
$output = `/path/to/php my_script.php`;