in reply to Re: Filehandle open?
in thread Filehandle open?
sub is_opened { no warnings qw(closed unopened); return tell $_[0] != -1; }
Update: Oops. s/==/!=/ - otherwise the truth value is reversed of course. Thanks, blakem.
Update 2: and of course, check perldoc perllexwarn about the detailed warning names you can use to enable/disable specifically.
Update 3 (the neverending story): fruiture informs me that you have to disable not only the closed category, but unopened as well. Code updated accordingly.
Makeshifts last the longest.
|
|---|