On Tue, Feb 05, 2013 at 05:33:02PM -0800, Jim Avera wrote: > Not saying this is a bug, but it seems wrong to not permit > STDIN to be closed: > > perl -we 'close STDIN; open my $fh,">/dev/null";' > Filehandle STDIN reopened as $fh only for output at -e line 1. > > It sounds like Perl implicitly re-opens STDIN when fd 0 gets > re-used for something else. It might be better to not complain > about this but die later if the handle STDIN is ever actually > opened and the fd does not end up being zero. Note that the warning is a bit misleading. It's really trying to say that $fh has been opened with the file descriptor normally associated with STDIN (i.e. fd 0), rather than saying that the perl filehandle STDIN has been re-opened. The perl handle STDIN is still closed (for both reading and writing). -- Indomitable in retreat, invincible in advance, insufferable in victory -- Churchill on MontgomeryThread Previous | Thread Next