in reply to filehandle open ??

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.