On Fri, Apr 20, 2007 at 10:13:24AM +0100, Joel Bernstein wrote: > perl -nle 'map{$X{$_}++}split/\s+/}{print"$_:$X{$_}"for sort keys%X' perl -F/\s+/ -anle '$X{$_}++for at X}{print"$_:$X{$_}"for sort keys %X' uses -a (autosplit) but is only slightly golfier. /joel