Don't ask to ask, just ask | |
PerlMonks |
Re: Nested loopsby nuance (Hermit) |
on Sep 13, 2015 at 13:42 UTC ( [id://1141831]=note: print w/replies, xml ) | Need Help?? |
$a and $b are special variables in perl, $c isn't. You have forgotten to put my statements in your foreach loops. The $a and $b that you're using are package variables that exist, so you don't get a waring. $c is not a pre-existing package variable so you get a warning. It's probably not a great idea to use $a and $b at all. If you were going to, the loops need to look like foreach my $a (@list1) Nuance
In Section
Seekers of Perl Wisdom
|
|