http://qs1969.pair.com?node_id=690443


in reply to Re: making sure a file is not currently being written to
in thread making sure a file is not currently being written to

Only if you use lexical variables as file handles. If you use open HANDLE, '>', $file;, then HANDLE is a global that doesn't go out of scope.

Ah, I didn't realise this, thank you (I'm not yet quite on top of typeglobs(?)). In reality there are a lot of different subs writing to that file---I thought I had checked them all for terminating close()s, but perhaps I've missed one... What I'm doing should be fairly simple, so I doubt I've found a long hidden bug.. much more likely to be a mistake on my part. I'll check it out :)

thanks

........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......