Hey all,
I'm trying to execute a perl script from php and I want to pass a string via command line.
However it's not liking my syntax which im sure is wrong.
I execute the perl script from php like this.
$stringvariable="This is a string";
exec('perl script.pl $stringvariable',$result);
And in my perl file
$survey=$ARGV[$0];
echo $survey;
Which moans and says
Use of uninitialized value in array element at script.pl line 4.
Hope someone can help.
Thanks!
I'm trying to execute a perl script from php and I want to pass a string via command line.
However it's not liking my syntax which im sure is wrong.
I execute the perl script from php like this.
$stringvariable="This is a string";
exec('perl script.pl $stringvariable',$result);
And in my perl file
$survey=$ARGV[$0];
echo $survey;
Which moans and says
Use of uninitialized value in array element at script.pl line 4.
Hope someone can help.
Thanks!