Gossamer Forum
Home : General : Perl Programming :

Re: [encino] Calling a cgi script inside another cgi script passing variables

Quote Reply
Re: [encino] Calling a cgi script inside another cgi script passing variables In reply to
Seems to work for me.

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
Subject Author Views Date
Thread Calling a cgi script inside another cgi script passing variables encino 6363 May 28, 2003, 8:46 PM
Thread Re: [encino] Calling a cgi script inside another cgi script passing variables
Paul 6255 May 29, 2003, 2:26 AM
Thread Re: [Paul] Calling a cgi script inside another cgi script passing variables
encino 6204 May 29, 2003, 5:10 PM
Thread Re: [encino] Calling a cgi script inside another cgi script passing variables
Paul 6248 May 29, 2003, 5:18 PM
Post Post deleted by encino
encino 6146 May 29, 2003, 5:53 PM
Post Re: [Paul] Calling a cgi script inside another cgi script passing variables
encino 6165 May 29, 2003, 7:19 PM