Brian Tillman wrote:
I'm probably missing something, but what's wrong with?:

sort {$b <=> $a} @array;

Nothing, unless you have, as you really should, warnings enabled:

$ perl -le'
use warnings;
my @array = ( "1,fresh", "2,testurl" );
@array = sort { $b <=> $a } @array;
print for @array;
'
Argument "1,fresh" isn't numeric in sort at -e line 4.
Argument "2,testurl" isn't numeric in sort at -e line 4.
2,testurl
1,fresh



John
--
Those people who think they know everything are a great
annoyance to those of us who do.        -- Isaac Asimov

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to