You forgot to binmode/:raw
Encode::Detective - detect a data encoding
In reply to Re: convert files to ansi (8859-1) by Anonymous Monk in thread convert files to ansi (8859-1) by Yaerox