Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: Problem with Encode::Guess

by jimhenry (Novice)
on Nov 10, 2010 at 21:42 UTC ( #870703=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://870703]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2023-02-07 04:33 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (38 votes). Check out past polls.