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

Re: PERL/Windows file open error

by Laurent_R (Canon)
on Mar 04, 2019 at 15:46 UTC ( #1230850=note: print w/replies, xml ) Need Help??


in reply to PERL/Windows file open error

Hi,

maybe try to change this line:

open ($FH,'<',$fn);
to something like this:
open $FH, '<', $fn or die "Failed to open file $fh $!";
This way, you can ascertain the name of the file you were trying to open and figure out whether there is something wrong with the content of $fh.

Update (15:50 UTC): I see now that you're actually printing the file name right before, so what I suggested is useless. And also that you're using autodie. Never mind.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2021-10-20 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (81 votes). Check out past polls.

    Notices?