"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I've played and played with this on 2k.
There are 2 ways that I can recreate this error, but neither of them seem applicable. First, if I don't have the die statement after the open, and use a bad filename I get the error after the close. This is obvious. Second, if the file has only read permissions, and I print to it (with a die statement on the print) I get the same error, which is only slightly less obvious. In your code though, you are not modifying the file in anyway, and have the die statement after the open. If you attempt to simply open and close the filehandle (for the file that you are having the problem with) in a seperate script does the same thing happen? Is this happening with every file, or is it just one (I ask that because I see this in a subroutine, I'm assuming multiple files)? Is this code cut and pasted from your script or did you retype it here? I've retyped the code a couple of times, rather than pasting it in and noticed that my code I'm submitting here and the code I'm having the problem with has occasionaly differed subtly (with the difference being what was causing the problem). In reply to Re: Win32 bad file descriptor
by the_slycer
|
|