in reply to How do I tell if a handle is open for writing?
Well I may be a member of the idiots' club along with you, and this certainly isn't pretty, but is there a reason this wouldn't work?:
update please ignore this and listen to Zaxo :-)eval { my $pos = $fh->tell; $fh->print('1'); $fh->seek($pos); }; my $ready_for_writing = ($@) ? 0 : 1;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How do I tell if a handle is open for writing?
by Aristotle (Chancellor) on Nov 07, 2005 at 16:44 UTC | |
by jZed (Prior) on Nov 07, 2005 at 16:49 UTC | |
Re^2: How do I tell if a handle is open for writing?
by VSarkiss (Monsignor) on Nov 07, 2005 at 16:51 UTC | |
by DrWhy (Chaplain) on Nov 07, 2005 at 17:47 UTC |
In Section
Seekers of Perl Wisdom