Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: if and unless

by tfrayner (Curate)
on Dec 16, 2001 at 21:36 UTC ( #132364=note: print w/replies, xml ) Need Help??


in reply to if and unless

Hmm...

Possibly the following is what you want. It depends on whether the 'something screwing up' happens during execution of your 'do something else' or whether it just happens to be an input into the whole condtional, as shown here:

if ((some condition) && !(some counter-condition)) { do something }
As has been obliquely pointed out, unless can really be thought of as the opposite of if, so your code is essentially two consecutive and unrelated conditionals.

Sorry if this is not what you're after. It's hard to be sure :-)

Tim

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://132364]
help
Chatterbox?
[Discipulus]: good morning folks!
choroba mornings back
[Corion]: Hi choroba!
[Corion]: And Discipulus!
Corion arrived back from London. Always nice to meet people again, even if it's just once per year.
[Corion]: Also, dk contributed some cool stuff to App::ShaderToy, like menu settings and real fullscreen, eliminating many of my #TO-DO comments ;)
[Corion]: I hope you spent the four days well without me online ;-D

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-12-06 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.