in reply to Re: reverse sort arrays in subroutines
in thread reverse sort arrays in subroutines
davido, in my sample code, I'm trying to reverse the sort. I think I have your example but it only does the sort.
: my @SortedArray = reverse sort @PassedArray;.in my sample code
my @SortedArray = sort reverse @PassedArray;choroba, I tried your syntax in my code, but I still get only a sort - not a reverse sort. I'm sure this is part of my overall difficulties with arrays in subroutines, but I'm stymied. Here's what I tried:
my @SortedArray = sort ( reverse ( @PassedArray ) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: reverse sort arrays in subroutines
by choroba (Cardinal) on May 21, 2013 at 22:05 UTC | |
|
Re^3: reverse sort arrays in subroutines
by Laurent_R (Canon) on May 21, 2013 at 22:13 UTC |