in reply to Re: String Validation
in thread String Validation

if ($lastname =~ /[^a-zA-Z' -]/) { die("Bad character\n"); }

Ref: perlre