Re: returning values/information from perl apps to php apps..

From: Date: Tue, 05 Oct 2004 02:10:13 +0000
Subject: Re: returning values/information from perl apps to php apps..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198642@lists.php.net to get a copy of this message
the issue i'm having is that perl only seems to allow an app to have an 'exit' value of a short int. i need to return values that might be multiple arrarys. should i simply write the perl return values into an output file, and read the output vars from the output file in the php file...
I believe that PHP has facilities for executing external processes and saving the text of the output (I've done just a sprinkling of PHP, so I'm limited there). But if that is the case, there is nothing preventing you from having the Perl application print out the desired data in a structured format (comma-separated values, tab-separated, or even mock-XML) and having the PHP then parse it. Indeed, if you output it as XML, I believe that PHP has classes built-in that would allow you to effectively go straight to having a DOM representation of the data. Randy -- rjray@blackperl.com http://www.rjray.org http://www.svsm.org Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Rick Osborne

« previous php.general (#198642) next »