Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How do tell if a filehandle is open / in use ?

Replies are listed 'Best First'.
Re: filehandle open ??
by Fastolfe (Vicar) on Jan 04, 2001 at 07:50 UTC
    use FileHandle; and check the file handle's "opened" method.
    use FileHandle; print "whew!\n" if STDOUT->opened;
    See IO::Handle and IO::File for other nifty things you can do with file handles in this fashion.
Re: filehandle open ??
by merlyn (Sage) on Jan 04, 2001 at 21:40 UTC