++ 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}; } }
In reply to Re^2: Iterating hash of blessed hashes
by BrowserUk
in thread Iterating hash of blessed hashes
by ron7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |