in reply to Foreach syntax

for my $p9 ({grep($is_available{$_}} keys %is_available)) { ...
But, personally, I prefer:
for my $p9 (keys %is_available) { next unless $is_available{$p9}; ...
I find it more readable, and it should be more efficient as well, as you don't create another array.

Replies are listed 'Best First'.
Re^2: Foreach syntax
by JimSki (Acolyte) on Jul 25, 2008 at 16:17 UTC
    Thanks to all. You guys rock!