Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-02-21 18:18 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (285 votes). Check out past polls.