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

Re: read closed directory handle?

by lemming (Priest)
on Jan 27, 2001 at 02:42 UTC ( [id://54659]=note: print w/replies, xml ) Need Help??


in reply to read closed directory handle?

You're closing the FILEHANDLE with close. I don't think a warning is generated when trying to close a directory handle.
If you use closedir, you'll wind up with nothing printed.

Update: It doesn't hurt to check if you successfully close file or directory handles. That would show the error with the close, instead of closedir.
My guess on why warnings and strict didn't show anything is that you used the variables involved, but that's only a guess.
readline will bring up a warning on a closed filehandle, but readdir doesn't seem to care that's it tries reading a closed directory handle.

Log In?
Username:
Password:

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

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

    No recent polls found