$lastchar = substr($email,-1); print p,$lastchar; if ($lastchar =~ /[a-zA-Z]/){ } else { print p, "Testing...Last char is not alphabetic"; chop($email); print p,"Testing...found newline, so we're chopping it!"; print p,"Testing...$email after chop " . length($email); }