
andy7t
User
Jan 4, 2005, 11:17 AM
Post #1 of 4
(821 views)
|
|
Passing Variables to a script
|
Can't Post
|
|
Hi, This should be a straight forward question. I want to pass variables from one Perl script to another. I've tried this: SCRIPT 1: $calling=`perl script2.cgi var1=thing`; SCRIPT 2: use CGI; $query=new CGI; $called=$query->param('var1'); However, $called never returns anything. If i just run perl script2.cgi var1=thing direct from the command line, SCRIPT 2 works fine, so why doesn't EITHER the CGI module pick up the paramaters, or SCRIPT 1 doesn't pass the paramaters? I know that the script is been called sucessfully, because $calling returns the rest of SCRIPT 2, it just doesn't pass the vars.
(This post was edited by andy7t on Jan 4, 2005, 11:18 AM)
|