in reply to Re^2: Issue with matching regex
in thread Issue with matching regex

Good point!
So, e.g. by reversing the order of substatements inside the IF statement gives opposite result.
if(($check =~ m/YES/i) and (($line =~ m/$var1/i) || ($line =~ m/$var2/ +i))) { print "Inside if\n";} else {print "Outside if\n";}
...unless ($check =~ m/Y/i) :)