List::Util is probably the easiest for simple lists:
use strict; use warnings; use List::Util qw(max); my @list = qw(1 99 33 2 1024 13); print max(@list) . "\n"
Update: Note that List::Util could still be useful for hashes via the keys and values functions.
In reply to Re: largest number inside array/hash
by Art_XIV
in thread largest number inside array/hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |