Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: The Boy Scout Rule

by karlgoethebier (Abbot)
on Jan 26, 2015 at 10:04 UTC ( [id://1114497]=note: print w/replies, xml ) Need Help??


in reply to The Boy Scout Rule

"Would this statement pass your code review?..."

I would use List::Util by all means.

See also Don't be clever.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^2: The Boy Scout Rule
by Anonymous Monk on Jan 26, 2015 at 10:20 UTC
    Yeah, using max() for two values is going overboard :) its just like using bitshifting on codethinkied ... which is just like the anon-array-dereference eyepopslikeamosquito posted .... just use the ternary or if/else

Log In?
Username:
Password:

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

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

    No recent polls found