Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: encoding trouble

by Eily (Monsignor)
on Apr 26, 2019 at 14:43 UTC ( [id://1233019]=note: print w/replies, xml ) Need Help??


in reply to [SOLVED] encoding trouble

Because @ARGV is not empty when you read with <>, the handle that is read from is not STDIN but ARGV instead.

use open IO => ':utf8'; may work better (ARGV is only opened by <> at which point it's to late to call binmode because some data as already been read.)

s/perlvar/ARGV/, thanks choroba

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found