Seems to work for me.
Script 1:
#======================================
use strict;
main();
#======================================
sub main {
#--------------------------------------
# Test.
local $ENV{QUERY_STRING} = q|name=paul|;
print "Content-type: text/plain\n\n";
print qx/perl test2.cgi/;
}
Script 2:
#======================================
use strict;
main();
#======================================
sub main {
#--------------------------------------
# Test.
print "You passed in: $ENV{QUERY_STRING} to $0";
}
Output:
You passed in: name=paul to test2.cgi
Script 1:
Code:
#!/perl/bin/perl #======================================
use strict;
main();
#======================================
sub main {
#--------------------------------------
# Test.
local $ENV{QUERY_STRING} = q|name=paul|;
print "Content-type: text/plain\n\n";
print qx/perl test2.cgi/;
}
Script 2:
Code:
#!/perl/bin/perl #======================================
use strict;
main();
#======================================
sub main {
#--------------------------------------
# Test.
print "You passed in: $ENV{QUERY_STRING} to $0";
}
Output:
You passed in: name=paul to test2.cgi