Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I agree with BrowserUK and others about appropriate use of || or //. More generally, I would say ternary operator is great when you have simple values to compare. If the terms become complicated, you want something else, maybe an actual IF block. It's not just a matter of making the code work correctly. The code needs to be decipherable for the sucker who has to read it six months from now to implement some change requirement. As Occam said: Entia non sunt multiplicanda praeter necessitatem. In reply to Re: Perl ternary operator style
by TomDLux
|
|