in reply to Re^3: Why does 'print shift sort @array' not work?
in thread Why does 'print shift sort @array' not work?
pop @{[ sort qw(a f e b) ]}
(Sort, make an array and a reference to it, dereference it, get the last item.)
would be
( sort qw(a f e b) )[-1]
(Sort, get the last item.)
min/minstr/max/maxstr is both shorter, less work, and more straightfoward, but it is not nearly as flexible.
maxstr qw(a f e b)
(Get max item.)
|
|---|