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.