If you want the last element of a list, you can use a literal slice:
Also, if you're sorting numbers, you'll want to look into user-defined sorts. The built-in sort sorts as strings, which will mess up your day on numbers.my $max = (... list ...)[-1];
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: pop sort strangeness
by merlyn
in thread pop sort strangeness
by Brovnik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |