in reply to sort an array with +ve & -ve numbers in it
my @sorted = sort { $a <=> $b } @numbers; my $min = $sorted[0]; my $max = $sorted[-1];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sort an array with +ve & -ve numbers in it
by missingthepoint (Friar) on Apr 04, 2009 at 05:08 UTC |