in reply to Re: if variants
in thread if variants
Personally I like:
if ($i>1) { $a = function_that_may_fail(); $i = ($a) ? $i+1 : 1; }
I find that the only time I really use "and" and "or" are with carp/croak/warn/die. But that's just me.
At worst:
do { $a=function_that_may_fail(); $i= $a ? $i+1 : 1; } if ($i>1)
In Section
Meditations