How to pass data from a perl script to php?

So I have php function that calls a perl script with the php exec function.

$command = ‘/usr/bin/perl myperlscript.pl’';
$system_output = exec($command);

However I don’t any output when I run the script from within the php function - However if I run the perl script directly on the command line the script provides output to the command line.

I do not get any php errors or warnings to go on… - so there any other options to get data from perl to php? or is there something I’m missing??

any help or suggestion would be greatly appreciated.

have you tried

exec($command,$output,$retval);

This should return the results in an array $output and any return value set in $retval.

Then you could do a print_r($output) to dump the results.

Btw, read this from the php manual for more clarity on what I stated above.

http://us.php.net/function.exec