On topic: The Wednesday Challenge

Andy Armstrong andy at hexten.net
Wed Aug 15 15:56:06 BST 2007

On 15 Aug 2007, at 15:37, Aidan Samuel wrote:
> Terrible I know, but I just wanted to be the first!
> perl -e 'my%x=();while (<>){$x{$_}++for unpack("C*",$_)}print
> chr($_)x$x{$_}for sort keys%x;' < 64m.bin > 64m.sorted.bin

I'd say that's pretty good :)

For added credits how about doing it without sort at all?

Andy Armstrong, hexten.net

More information about the london.pm mailing list