Why all the extra modules stuff? Just sort the array and grab the first or last one depending on how you sorted it.
This should do everything you want:
@array = sort { $b <=> $a } @array; printf("%03d",shift @array);
Update This way is simple but of course as sporty said, it takes longer
In reply to Re: getting the highest value in a simpler way
by cfreak
in thread getting the highest value in a simpler way
by replicant4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |