Friday Perl Challenge

MHP Ltd mansionhouseprojects at googlemail.com
Fri Apr 20 10:32:24 BST 2007


I presume this breaks the rules, but have reached for the sort | uniq
-c pistol too often!

perl -nle 'print `echo $_ | tr "/ /", "\n" | sort | uniq -c`'

On 20/04/07, Joel Bernstein <joel at fysh.org> wrote:
> perl -nle 'map{$X{$_}++}split/\s+/}{print"$_:$X{$_}"for sort keys%X'
>


More information about the london.pm mailing list