Page 1 of 1

PHP system() passing name_value pairs?

Posted: Wed Jan 08, 2003 4:40 pm
by rxsid
Hi all,

How would I do this:
Have a PHP script, call a PERL script and pass <input type=hidden> fields (or just the name_value pairs) to that PERL script...and then return to the PHP script?

something like:

Code: Select all

$return = system($thePerlScript, '$variableA=something,$variableB=anotherthing');

Posted: Sat Jan 11, 2003 11:25 pm
by evilcoder
explain a little more? sorry not getting what your asking.

Posted: Sun Jan 12, 2003 5:46 am
by volka
depends on how those variables are read by the perl-script.
There are mainly two ways to make values available for (child)processes.
  • By passing arguments: myPrg arg1 arg2 arg3. Those are available within a perl-script via the array @ARGV (e.g. $ARGV[0], $ARGV[1], ...)
  • By setting enviroment variables, accessable via %ENV (e.g. $ENV{home}) in perl.
make your choice :D