Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 meditating upon the Monastery: (4)
As of 2023-03-24 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (61 votes). Check out past polls.

    Notices?