Re: Perl and PHP

From: Date: Wed, 06 Mar 2002 22:43:25 +0000
Subject: Re: Perl and PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87545@lists.php.net to get a copy of this message
If the value you want to send back to php is an integer you could just say exit $number; from perl and that will be put into your $var. Otherwise use exec() instead of system. exec("/path/to/perlscript.pl", $scriptOutputArray, $scriptExitValue); Anything that gets printed from the perl script should show up in the $scriptOuputArray. -Steve On Wednesday, March 6, 2002, at 04:19 PM, Michael Hess wrote:
Thanks, Ok, I got it to work.....now how do I take a varaible back into PHP I do a $var = system("/path/to/cgi $varforCGI") and in the CGI script I do a print $varforPHP however it prints the varforPHP to the broswer, I need it saved it var Any (more) help would be great!! Michael On Wed, 6 Mar 2002, Steve Cayford wrote:
If you're running a perl script on the command line you would use /path/to/perl/script.pl value1 value2 value3 ... In your perl script $ARGV[1] should hold value1, $ARGV[2] should hold value2, etc. -Steve On Wednesday, March 6, 2002, at 02:48 PM, lists@mhess.qn.net wrote:
I need to pass a variable to Perl from a PHP script. I am somewhat know PHP but I do NOT know perl....I am running my perl script off of the command line. I tried /path/to/somewhere/script.pl?var=var but it did not work. I would love any help you could provide me Thanks, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#87545) next »