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

foreach loop :(

Thread Next
March 16, 2002 23:38
foreach loop :(
Message ID:
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";

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About