Re: How to local-ly close a handle?
- From: Ben Morrow <benmorrow@xxxxxxxxxxxxx>
- Date: Mon, 17 Jul 2006 14:10:13 +0100
Quoth "Ferry Bolhar" <bol@xxxxxxxxxxxxxxxxx>:
Ben Morrow:
The fd you closed will remain closed, but the Perl filehandle will
revert to pointing to its old fd, and thus will be open again. :)
....unless you've closed the old fd as well in the meantime.
But the OP wrote:
...then STDERR *is* finally silenced, but it *remains* silenced outside
of the block (e.g. the message from the die statement doesn't show);
i.e. the closing is not localized.
So, this contradicts what you said above, doesn't it?
The OP's example was
local *STDERR = *STDERR;
so in this case old fd == new fd, and obviously closing one closes the
other.
Ben
--
Outside of a dog, a book is a man's best friend.
Inside of a dog, it's too dark to read.
benmorrow@xxxxxxxxxxxxx Groucho Marx
.
- References:
- How to local-ly close a handle?
- From: kj
- Re: How to local-ly close a handle?
- From: Ferry Bolhar
- Re: How to local-ly close a handle?
- From: Ben Morrow
- Re: How to local-ly close a handle?
- From: Ferry Bolhar
- How to local-ly close a handle?
- Prev by Date: Re: Perl integrating with PHP
- Next by Date: Extract alternate patterns
- Previous by thread: Re: How to local-ly close a handle?
- Next by thread: Perl equivalent of this script?
- Index(es):
Relevant Pages
|