in reply to Re: Re^4: Golf: Arbitrary Alphabetical Sorting
in thread Golf: Arbitrary Alphabetical Sorting
It may not display well, but the two escape sequences can be replaced by the actual characters. This brings it back down to 70. Here is the paste from my system, this may not work on yours:
sub o{ ($c,*w,$")=@_;sub t{eval"y/\Q@$c\E/-ÿ/";$_}sort{t($_=$a)cmp t$_=$b}@w }
UPDATE
It definitely won't work on yours. It seems the \0 was
trimmed from the output. To get what you need go back to
chipmunk's post, download his code to a file, then run
this:
(Use " instead of ' on Windows.) The resulting file will have the key subroutine reduced to 70 characters, and will still run.perl -pi.bak -e 's/\\(\d+)/chr(oct($1))/e' filename
|
|---|