Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
A more general question is: what are you computing with this if statement?
If it's something interesting and complex, think about whether or not you can factor out some or all the functionality into it's own function, so you can re-use it elsewhere, and test it independently. If it's something simple, then the number of lines you need to code it won't really matter. For example, it's probably better to use this for a complicated condition: but you can use something like this for a simple one...
-- In reply to Re: in search of a more elegant if then else
by Anonymous Monk
|
|