|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: Is this reliable?by frozenwithjoy (Chaplain) |
| on Feb 18, 2013 at 17:11 UTC ( #1019373=note: print w/ replies, xml ) | Need Help?? |
|
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:
I find it very readable.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||