Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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

Comment on Re: How to handle encoding for STDERR
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2015-11-28 16:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls