$sss = "9 9"; if ($sss =~ m/(([A-Za-z]*)(\d*)/ && $1 ne undef){ print "Value Matched on: $1"; # if statement is not entered; prints nothing }