Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: if variants

by SpanishInquisition (Pilgrim)
on Oct 19, 2004 at 16:37 UTC ( #400584=note: print w/replies, xml ) Need Help??


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)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://400584]
help
Chatterbox?
[Corion]: Congratulations Lady_Aleena ;)
[Lady_Aleena]: Thanks Corion.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2017-04-26 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (469 votes). Check out past polls.