Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: pop sort strangeness

by Zaxo (Archbishop)
on Nov 15, 2004 at 16:10 UTC ( [id://407855]=note: print w/replies, xml ) Need Help??


in reply to pop sort strangeness

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,

use List::Util qw(max); my $max = max @vals;
There is a lot of lost motion in that unnecessary sort.

After Compline,
Zaxo

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://407855]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-25 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found