Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Sorting a text file

by Moron (Curate)
on Mar 15, 2007 at 18:30 UTC ( [id://605044]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://605044]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found