Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Unable to read files from a directory

by GrandFather (Saint)
on May 14, 2009 at 03:12 UTC ( [id://763981]=note: print w/replies, xml ) Need Help??


in reply to Re: Unable to read files from a directory
in thread Unable to read files from a directory

I'd go somewhat further than your last paragraph and say:

Always use the three parameter version of open and use lexical file handles:

open my $inFile, '<', $filename or die "Unable to open $filename: $!";

True laziness is hard work

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-23 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found