Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Is this reliable?

by frozenwithjoy (Curate)
on Feb 18, 2013 at 17:11 UTC ( #1019373=note: print w/ replies, xml ) Need Help??


in reply to Is this reliable?

My preference is to use the ternary operator (like others have shown) if you are setting $r once, but if I were updating $r in a loop, for example, based on the value of $temp, I'd probably just go with this:

$r += 250 if $temp > 100;

I find it very readable.


Comment on Re: Is this reliable?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2015-07-06 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (80 votes), past polls