Re: tricky perl question - ascending order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 05/24/2010 06:39 AM, Jozsi Vadkan wrote:
> The solution [from the FreeBSD mailing list]:
> 
> perl -00 -e 'print map $_->[0], sort { $a->[1] <=> $b->[1] } map [$_,
> tr/\n//], <>' < before.txt > after.txt
> 
> Thank you!!

FYI a lovely piece of magic from 1994:-)

http://en.wikipedia.org/wiki/Schwartzian_transform

Kal
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux