in reply to open fails with no error code
I don't know what's bit you, as $! should really get set if open returns false. Just one thought: if there are signal handlers set, they should localize $! if they do anything that might effect it. I've been bitten by that once using signal handlers. (Don't assume that a function does not change $! just because it's not documented. Also, a function may still change $! if it succeds, as it may have called other functions that have failed.) Also check if you are really calling the builtin open function, not just a function that shaded it.
Update: also, make sure that the open call really returns false, it's not just you thinking it failed because you can't read the filehandle or similar simptoms.
|
|---|