use strict; use warnings; our $a = "something"; if($a eq "taste") { print "\nNot equals"; } elsif($a eq m/ERROR/) { print "\nNot matches regex"; }