http://qs321.pair.com?node_id=755304


in reply to Re^3: sort an array with +ve & -ve numbers in it
in thread sort an array with +ve & -ve numbers in it

Very true, corrected code:

my @array = ( 99, 67, 0, -100, -38, 98); my ($min, $max) = (sort {$a <=> $b} @array)[0,-1];

Update: Cut n paste error fixed, thanks plobsing and ikegami


___________
Eric Hodges