http://www.perlmonks.org?node_id=533736


in reply to is filehandler used ?

if (*STDOUT{IO}) { print "it's used\n"; }