You could try using Win32::Fmode or FileHandle::Fmode to determine if the handle passed is open for the appropriate type of operations.
Note: Both will fail to deal with ramfiles or IO::String handles.
In reply to Re: Passing a Filehandle that Might be a Bareword
by BrowserUk
in thread Passing a Filehandle that Might be a Bareword
by Xiong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |