Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Double Sort Rephrased

by rchou2 (Novice)
on Jul 22, 2002 at 23:03 UTC ( [id://184280]=note: print w/replies, xml ) Need Help??


in reply to Re: Double Sort Rephrased
in thread Double Sort on a file

no, i have a file with the three columns, and i want to sort first based on the last column and then sort the second column numerically......and i need to sort the file....i tried using sort -k 3 -n -r -k 2 filein -o fileout but it didn' get the results i expected

Replies are listed 'Best First'.
Re: Re: Re: Double Sort Rephrased
by rchou2 (Novice) on Jul 22, 2002 at 23:18 UTC
    well, it is a perl question...i'm trying to modify the file through perl....
      sorry, i'm new to perl, so if some of the questions are obvious, i apologize.....what's the purpose of this line? map { $_ ,/(\w+)\s+(\w+)\s+(\w+)/} <DATA>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-18 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found