You could pop from an anonymous array like this, my $max = pop @{[sort @vals]}; where the cast turns sort's list into a nameless array. It's much better to say,
There is a lot of lost motion in that unnecessary sort.use List::Util qw(max); my $max = max @vals;
After Compline,
Zaxo
In reply to Re: pop sort strangeness
by Zaxo
in thread pop sort strangeness
by Brovnik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |