Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Issue with matching regex

by jwkrahn (Abbot)
on Oct 20, 2022 at 06:12 UTC ( [id://11147532]=note: print w/replies, xml ) Need Help??


in reply to Issue with matching regex

$ perl -e' $line = "xyz"; $var1 = ""; $var2 = "abc"; #check = "Yes"; if ( ( ( $line =~ m/$var1/i ) || ( $line =~ m/$var2/i ) ) and ( $check + =~ m/YES/i ) ) { print "Inside if\n"; } else { print "Outside if\n"; } ' Outside if

Is this what you are seeing? What is the problem?

Sorry, typo on line 5.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-20 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found