Andrew Savige wrote:
> 
> Replacing the grotty sprintf with pack saves 4 strokes:
> 
> #!perl -lp
> / /;$A{pack A10,$'}.=$".$`}for(map{s}.}9-$&}e;$_}sort
> map{9-$A{$_}=~y. ..." $_:$A{$_}"}keys%A){

And replacing one map with a sort, taking advantage of the fact that
in 5.8, sort is stable, saves 10 strokes:

#!perl -lp
/ /;$a{pack A10,$'}.=" $`"}for(sort{$b-$a}map$a{$_}=~y/ //." $_:$a{$_}",sort
keys a){

P.S. Ever wonder what yours is going to do when someone has more than
nine modules ?

-- 
Rick Klement

Reply via email to