You'll get a warning if you try to tell() on that filehandle but that warning can be suppressed, for we know what we're doing. An unopened handle will return -1 as position:
sub opened($) { my $fh = shift; no warnings; #turn 'em off locally return tell($fh)==-1 ? undef : 1 }
HTH
--In reply to Re: Filehandle open?
by fruiture
in thread Filehandle open?
by maclypse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |