Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Answer: How I do I sort a list of strings?

( #272790=categorized answer: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sort SUBNAME LIST
    sort BLOCK LIST
    sort LIST
    
  2. or download this
        # sort lexically
        @articles = sort @files;
    ...
        use sort '_mergesort';  # note discouraging _
        @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old;   
     
    
  3. or download this
        @articles = sort {$b <=> $a} @files;   
     
    
  4. or download this
        @articles = sort {$FooPack::b <=> $FooPack::a} @files;   
     
    

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-12-26 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls