if (substr($acct_trtmt_hsty,1,1) =~ m/([789])/) { print "the number is: " . $1; }