Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Help with IF statement for 2 matching conditions.

by Athanasius (Monsignor)
on Nov 26, 2012 at 13:22 UTC ( #1005651=note: print w/ replies, xml ) Need Help??


in reply to Help with IF statement for 2 matching conditions.

Sounds like you’re looking for logical AND, which is && (or its lower-precedence version and):

if ($host =~ /mac/ && $browser eq 'iexplore') { ...

Hope that helps,

Athanasius <°(((><contra mundum


Comment on Re: Help with IF statement for 2 matching conditions.
Download Code
Re^2: Help with IF statement for 2 matching conditions.
by Doozer (Beadle) on Nov 26, 2012 at 13:26 UTC
    Wow what quick responses! Thanks a lot. I thought it must have been something simple but I couldn't find anything on the web, probably because I was searching for the wrong statement.

    Cheers!

      The building blocks in Perl are easy and powerful. With those blocks you can make very complex functionality.

      Good luck coding and automating the world!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005651]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2014-07-25 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (169 votes), past polls