in reply to Checking for Valid Characters

A little more context may help here. Do you mean a GUI with a little animated finger the jumps around the screen pointing to invalid characters? Perhaps you mean a coloured printout with invalid characters in red? Maybe you mean a list of character positions in the file where there are bad characters?

Are the characters expected to be 7 bit ASCII characters, or are they perhaps UTF8, or maybe they are something else?

Are control characters ok? How about the DEL character?

Perhaps you need to write a little code, then ask for some help when you have sorted out what you really want to achieve?


DWIM is Perl's answer to Gödel