Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: reverse sort arrays in subroutines

by davido (Archbishop)
on May 21, 2013 at 21:39 UTC ( #1034612=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @SortedArray = sort { $b cmp $a } @PassedArray;
    
  2. or download this
    my @SortedArray = reverse sort @PassedArray;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2016-07-28 20:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (258 votes). Check out past polls.