develooper Front page | perl.perl5.porters | Postings from October 2003

Re: [perl #24204] Dupping STDERR for reading.

Thread Previous | Thread Next
From:
Mark Jason Dominus
Date:
October 14, 2003 20:34
Subject:
Re: [perl #24204] Dupping STDERR for reading.
Message ID:
20031015033500.2788.qmail@plover.com

Michael G Schwern <schwern@pobox.com>:
> On Tue, Oct 14, 2003 at 08:39:27AM -0000, camel@abigail.nl (via RT) wrote:
> > A recent discussion on Perlmonks revealed that older versions
> > of Perl allowed you to dup STDERR for reads, but newer versions
> > don't. Opening STDERR for reading is a useful trick to be able
> > to read input from the keyboard if STDIN was redirected.
> 
> Errr, I don't understand how that would work.  Why would keyboard input
> be going to STDERR?
> 

By default, STDERR is open to the terminal device.  

The idea sounds pretty hokey to me, and less reliable than just
opening /dev/tty.




Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About