Wednesday, February 17, 2010

one line sorting hash perl

Onliner for Sorting a hash in perl

foreach (sort { $y{$a} <=> $y{$b}} keys %y) { printf "%60s %4d\n", $_, $y{$_}; }

No comments:

Post a Comment