Friday Perl Challenge

Peter Corlett abuse at cabal.org.uk
Fri Apr 20 14:49:42 BST 2007


On Fri, Apr 20, 2007 at 03:15:54PM +0200, Luis Motta Campos wrote:
[...]
> Yes. That makes it a char shorter:
> perl -nle 's{\S+}{$w{$&}++}eg}{print"$_,$w{$_}"for sort keys%w'

One more char:

perl -nle '$_++for at _{/\w+/g}}{print"$_,$_{$_}"for sort keys%w'



More information about the london.pm mailing list