in reply to Finding out non ASCII Characters in the text

There is a simpler way - count them with tr///,

$_ = 'a[bdy]dfjaPÃ?sdafÃ?'; print tr/\x0a\x20-\x7d//c, "unwanted characters in the string\n"; __END__ 2 unwanted characters in the string
That's usable as a logical element, too.

After Compline,
Zaxo