Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Help with IF statement for 2 matching conditions.

by Athanasius (Chancellor)
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

Replies are listed 'Best First'.
Re^2: Help with IF statement for 2 matching conditions.
by Doozer (Scribe) 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.


      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?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2016-10-28 06:44 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (375 votes). Check out past polls.