in reply to map and grep (but for hashes)
In general, I find using map or grep on keys %hash is usually all you need. If you really want to get complex, there are some ideas in the book 'Higher Order Perl' that allow you to do some interesting things.
But honestly, what's wrong with: grep { $hash{$_} == $expr } keys %hash; ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: map and grep (but for hashes)
by zerohero (Monk) on Jan 30, 2009 at 20:03 UTC | |
by runrig (Abbot) on Feb 03, 2009 at 18:43 UTC |