in reply to remove bad characters

You may want to use binmode http://perldoc.perl.org/functions/binmode.html when reading the file also.

Cheers
Chris

Replies are listed 'Best First'.
Re^2: remove bad characters
by ferreira (Chaplain) on Jun 27, 2007 at 11:18 UTC

    Just a note: Using binmode may be important for the sake of portability. Because if you're using only Unix, it is a no-op.