in reply to WebApps and Encoding

Are you sure that your names will be constrained to Latin-1? If not, perhaps you should allow for Unicode from the start.

Also, I prefer to check that there AREN'T any characters that AREN'T allowed rather than checking that EACH character IS.

while (my $name = <DATA>){ chomp $name; print "$name - ". ($name =~ /[^\p{Alpha} '-]/ ? "FAIL\n" : "PASS +\n"); } __DATA__ Müller D'Augustine De Vries Badin-Powell 1 of the above 1337 |-|@(|<3|?