in reply to multiple local vars in a foreach loop
Update: LanX is (of course) correct.
Not with foreach, but you can do it using while and each:
my %hash; while (my ($key, $value) = each %hash) { ... }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: multiple local vars in a foreach loop
by LanX (Saint) on Jan 31, 2013 at 11:28 UTC | |
by choroba (Cardinal) on Jan 31, 2013 at 11:30 UTC | |
by LanX (Saint) on Jan 31, 2013 at 11:33 UTC | |
by choroba (Cardinal) on Jan 31, 2013 at 11:37 UTC |
In Section
Seekers of Perl Wisdom