Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Sorting a File which contains numbers

by johngg (Canon)
on Oct 30, 2006 at 14:50 UTC ( [id://581305]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -le '@arr = (2, 17, 8, 5, 26);
    print for sort @arr;'
    
  2. or download this
    17
    2
    26
    5
    8
    
  3. or download this
    perl -le '@arr = (2, 17, 8, 5, 26);
    print for sort {$a <=> $b} @arr;'
    
  4. or download this
    2
    5
    8
    17
    26
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found