As already stated by ikegami, you really need to use the numerical sort: sort {$a <=> $b} @array
Try changing your data set to my @array = ( -10, 99, 67, 0, -100, -38, 98) and using that sort routine. This is probably the problem the OP is having. You're going to get -10 as the minimum.
In reply to Re^3: sort an array with +ve & -ve numbers in it
by lostjimmy
in thread sort an array with +ve & -ve numbers in it
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |