in reply to Is this "next unless $keys" necessary?
The situations where this would be needed are pretty contrived, IMHO. That would mean that someone is using hash keys of value zero or the empty string -- which is certainly allowable, but very contrived:
my %hash = ( foo => 'bar', 0 => 'baz', '' => 'qux', ); for (sort keys %hash) { next unless $_; print "$_ => $hash{$_}"; } for (sort keys %hash) { print "$_ => $hash{$_}"; }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In Section
Seekers of Perl Wisdom