Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How to handle encoding for STDERR

by ww (Bishop)
on Feb 11, 2013 at 13:51 UTC ( #1018144=note: print w/replies, xml ) Need Help??


in reply to How to handle encoding for STDERR

Whatever other problems may exist, your open (Ln 9) comes up a little short of a dozen; a few degrees off plumb; or, more directly, wrong:

Your open( my $in, '<', 'non-existing-file' ) || die $!; should be

open( my $in, '<', 'path-to-file-name' ) or die "Can't open path-to-f +ile-name, $!";

(with a [now deprecated, at least by some] bareword and variant quote symbols)

my $datafile; open (OUT, ">", $datafile ) or die "Can't open $datafile for write, $! +";
# for a write

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018144]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-02-19 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (292 votes). Check out past polls.