in reply to Sorting a text file

I suppose a perl -e would be based on...
%_=(); print sort { %_{ $a } ||= SortKey( $a ) <=> %_{ $b } ||= SortKey( $b ) } <>; sub SortKey { my @a=split /\t/, shift(); $a[1]; }

-M

Free your mind