in reply to Re: Iterating hash of blessed hashes
in thread Iterating hash of blessed hashes
++ your use of values. But you missed (your own) trick with grep in your procedural version:
my ($rating, $bwurl) = 0; foreach my $subhash ( grep $_->{Season} == $seasonnum, values %$hdata +) { if( $subhash->{Rating} > $rating){ $rating = $subhash->{Rating}; $bwurl = $subhash->{BannerPath}; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Iterating hash of blessed hashes
by ikegami (Patriarch) on Feb 17, 2011 at 16:25 UTC |