in reply to Filehandle open?
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
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Filehandle open?
by Aristotle (Chancellor) on Sep 24, 2002 at 13:43 UTC | |
|
Re: Re: Filehandle open?
by maclypse (Initiate) on Sep 24, 2002 at 13:37 UTC |