Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: List::Util max with block

by ikegami (Patriarch)
on Nov 06, 2009 at 20:06 UTC ( [id://805575]=note: print w/replies, xml ) Need Help??


in reply to Re: List::Util max with block
in thread List::Util max with block

Alternative:
my $max = shift(@list); my $max_c = complex_calculation($max); for (@list) { my $c = complex_calculation($_); if ($c > $max_c) { $max = $_; $max_c = $c; } }

Replies are listed 'Best First'.
Re^3: List::Util max with block
by dlarochelle (Sexton) on Nov 08, 2009 at 16:07 UTC
    Thanks ikegami,

    These are both excellent suggestions.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found