develooper Front page | perl.beginners | Postings from March 2002

foreach loop :(

Thread Next
From:
Mariusz
Date:
March 16, 2002 23:38
Subject:
foreach loop :(
Message ID:
OE32xm4iZrbUMjA2QUg0001352f@hotmail.com
html tags are not the problem. I included another print statement before the loop and that outputs "text 1 here" to the web. However, "text 2 here" doesn't get printed?? I feel stupid since it's only few lines and it looks very simple and ok to me...Can anyone think of a reason why would the script not continue after the loop?

Thanks for all the other tips regarding subject: param.(Gary, Daniel, Tiler, Tanton -thanks!)


#!/usr/bin/perl -W

use CGI ':standard';

print "Content-type:text/html\n\n";
print "text 1 here";
@names = param();
foreach $name (@names) {
 $$name = param($name);
}
print "text 2 here";
exit;

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About