Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2015-07-31 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls