Ok, I am still having some problems with this... Here is basically what I am doing...
In PHP: Exec ("path/perlscript.pl", $var1, $returnvar) Now this calls the perl script from PHP passing the perl script $var1 The perl script then should run and give me $returnvar. In Perl: $var = @ARGV; print "$var"; By just printing the $var to STDOUT in perl should give me the $returnvar. However the $returnvar is empty when it is returned to PHP. My question is, I am still a little iffy on the proper use of @ARGV Could someone give me a quick explanation of how this exactly works. Thanks Scott -----Original Message----- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 3:18 PM To: Batchelor, Scott Cc: begin begin Subject: Re: Calling Perl script from php. On Monday, June 10, 2002, at 12:58 , Batchelor, Scott wrote: > I am using an exec command like this: > > Exec "perl.pl $variable" > > Scott if you ran that at the command line, #demo in /bin/sh constructs variable="arg1 arg2 arg3" perl.pl $variable then your perl code either needs to walk through these "command line arguments" directly with walking @ARGV OR you may wish to look at Getopt::Std and/or Getopt::Long to use the more traditional ways of grovelling through the @ARGV values - and dealing with what stuff is suppose to be there with what flags and all... does that help???? ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]