Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Perl List files in directory

by hippo (Monsignor)
on Apr 22, 2014 at 11:26 UTC ( #1083142=note: print w/replies, xml ) Need Help??


in reply to Perl List files in directory

You wrote:

opendir(DIR, "/opt/tmp/" or die "Cannot open dir");

whereas what you probably meant was:

opendir(DIR, "/opt/tmp/") or die "Cannot open dir";

Better would be:

opendir(DIR, "/opt/tmp/") or die "Cannot open dir: $!";

Perhaps better still would be DirHandle but YMMV.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1083142]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2016-12-05 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (75 votes). Check out past polls.