Re: Sending information in a php page to perl and back

From: Date: Sat, 25 Nov 2000 17:32:09 +0000
Subject: Re: Sending information in a php page to perl and back
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27123@lists.php.net to get a copy of this message
It sounds like what you want is PHP to do eveything, except one little task which can be accomplished with a perl script. The easiest thing to do is use the following notation: $response = perlscript.pl $arg1 $arg2 $arg3 $arg4; note that those are NOT double-quotes OR single-quotes but the "backtick" operator (located left of the "1" key and above the tab key). This operator executes what is inside via shell (interpreting the variables first) and then returns any ouput. The more explicit way to do it is with pipes. Look at http://php.net/popen for more info. After doing this, you can just process whatever $response holds. Hope this helps, Jeff Davis Southoz wrote: > Hi, > > I am new to PHP but not Perl, and I can't find any information on this in > the archives, or documentation. > I have a perl script which does some processing for me, and I don't want to > rewrite what it does in php, but all the other perl from a web site I am > working on is in php. > What I need to do is to execute a perl script with arguments (from the > command line it is like: perlscript.pl question answer question1 answer1) > and the perl script returns a positive or negative response with a single > argument. > > So the user submits an html form to a php page, which does a number of > things, but needs to send some arguments to the perl script, then process > the response for the user. > > I have the perl script as a perl mod as well if this is useful (the perl > script just calls the perl mod anyway). > > Thanks for your time, > > Jeni > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#27123) next »