Hello,
I am having some trouble passing multiple variables to a perl script from php.
I have the following so far:
PHP Code -
myScript.pl -Code:<?php $var1 = "ABC"; $var2 = "123"; exec("perl myScript.pl $var1 $var2", $output); print_r($output); ?>
Currently only the first variable seems to be passed across. Left scratching my head at this oneCode:#!/usr/bin/perl $var1 = $ARGV[0]; $var2 = $ARG[1]; print "VAR1: ".$var1."\n"; print "VAR2: ".$var2;I must call the perl script from php.
Any help would be great, thank you.
-Silver Fox



Adv Reply





Bookmarks