Maybe it's too early in the morning here, but I can't seem to remember how to use a lexical $variable that is defined inside a foreach loop, outside of that loop. =:\
Here's the loop: foreach my $name (split (/, */, $names)) { next unless ($name =~ /\w/); my $sortstr = substr("00$totalcells", -2); $html =~ s|</td><td|</td>\n<td|g; $cell{"$sortstr$name"} = "<!--//CELL $name//-->"; $cell{"$sortstr$name"} =~ s/\[NAME\]/$name/sig; $totalcells++; } I want to use "$name" in another loop just after this one, but when I do, I get "Global symbol $name requires explicit package". Could someone please point me in the right direction? Thanks, Marc -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/