Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: reverse sort arrays in subroutines

by 2teez (Priest)
on May 21, 2013 at 21:48 UTC ( #1034616=note: print w/replies, xml ) Need Help??


in reply to reverse sort arrays in subroutines

change the line my @SortedArray = sort reverse @PassedArray; to my @SortedArray = reverse sort @PassedArray; in this case, It should do.
Please also use strict and warnings, in your codes, you would be glad you do.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Replies are listed 'Best First'.
Re^2: reverse sort arrays in subroutines
by JockoHelios (Scribe) on May 21, 2013 at 22:04 UTC

    2teez, That did the trick for the reverse sort. Now I'm back to more involved (for a newbie) subroutine coding, so I'll likely be back with another question before long :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2016-09-26 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (478 votes). Check out past polls.