%_=(); print sort { %_{ $a } ||= SortKey( $a ) <=> %_{ $b } ||= SortKey( $b ) } <>; sub SortKey { my @a=split /\t/, shift(); $a[1]; }
-M
Free your mind
In reply to Re: Sorting a text file
by Moron
in thread Sorting a text file
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |