in reply to Convert Week Of Year to Date
Now that there is some room, a minor rework of that code:
foreach my $week (sort keys %IssuesByWeek) { my $issues=$IssuesByWeek{$week}; print "$week:\n\t", join ("\n\t", map{ "$_ => $issues->{$_}" } ( sort { $issues->{$b} <=> $issues->{$a} } keys %$issues )[0..4] ),"\n"; }
Also using the temporary value makes things a little easier to read later on and also saves on the unecessary extra hash lookups.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Convert Week Of Year to Date
by ear (Acolyte) on Feb 01, 2005 at 18:54 UTC | |
by K_M_McMahon (Hermit) on Feb 01, 2005 at 18:58 UTC | |
by dragonchild (Archbishop) on Feb 01, 2005 at 18:58 UTC |