http://qs1969.pair.com?node_id=870703


in reply to Re: Problem with Encode::Guess
in thread Problem with Encode::Guess

What layer string should I pass to binmode in a context like this, where I don't (by definition) know what encoding the file I'm opening uses? Doing this:
open FH, $_ or die qq(can't open "$_" for reading\n); binmode FH, ':raw'; my @lines = <FH>; close FH;
has no effect on the program's behavior, and anything more specific than ":raw" would seem to entail a premature assumption about what encoding an unknown file uses.