grep { $hash{$_} > 1 } is equivalent to map {$_ if $hash{$_} > 1}
grep {$_ if $hash{$_} > 1} only greps if the key $_ is also true.
Which I agree is very odd code!
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re^3: why use a hash instead of an array
by LanX
in thread why use a hash instead of an array
by DarrenSol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |