What would the PHP script be outputing - would it be a web page? In order for perl to be able to execute, and capture the output of, a PHP script, PHP would have to be built as a CGI interpreter. You would want to be able to do something like this:
@php_output_lines = `/path/to/php/script.php`; ### notice the use of backticks here
But I can't be much help since I haven't built PHP that way, but I know it can be done.
If PHP is built into the webserver, and the PHP script you want to run and capture the output of is a web page, then you might be able to use a package like LWP::Simple to retrieve the page into a scalar variable(or array?) and then do with it what you will.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.