if (not defined $var) { print "The whole name was changed so no match found. You need to change your reg expression.\n"; exit 0; #Since no match then exit the script. }