Hi, I have a perl program that has an include directive calling another Perl program in it. The structure is somewhat as follows
first.pl ---------- #!/usr/local/bin/perl require "second.pl" $q = new CGI; print $q->hidden(-name='first', value='1'); second($q); End of first.pl ---------------- second.pl ---------- #!/usr/local/bin/perl sub second{ use CGI; my ($q) = @_; my $first = $q->param('first'); print $q->hidden(-name='second', value=$first); // This does NOT WORK print $first; // This WORKS!!! } End of second.pl ---------------- My problem is when first.pl loads, and then when I click it's Submit button, it calls itself (I havent pasted all that code here). Now it has to execute second.pl. However within second.pl, it is somehow not able to assign the value of $first to the hidden variable 'second'. I did a 'View Source' and the value field for 'second' comes up blank. I know that the $first variable is getting the correct value as the print command just below the hidden field definition works. Any ideas? Thanks, __________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>