in reply to Re: in search of a more elegant if then else
in thread in search of a more elegant if then else
If it "fits," and is easy to read, use the ternary. Otherwise, use the if-then. Think in terms of which one will be easier to understand when someone else - ie. your boss - will be looking over your shoulder while you try to figure out a bug in something you wrote $x months or years ago.
Be kind to yourself.
Be kind to yourself.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: in search of a more elegant if then else
by zebedee (Pilgrim) on Feb 19, 2010 at 09:07 UTC |
In Section
Seekers of Perl Wisdom