in reply to Foreach syntax
But, personally, I prefer:for my $p9 ({grep($is_available{$_}} keys %is_available)) { ...
I find it more readable, and it should be more efficient as well, as you don't create another array.for my $p9 (keys %is_available) { next unless $is_available{$p9}; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Foreach syntax
by JimSki (Acolyte) on Jul 25, 2008 at 16:17 UTC |