develooper Front page | perl.perl5.porters | Postings from September 2017

Re: [perl #132008] Term::ReadLine generates empty &STDERR files

Thread Previous | Thread Next
Bo Lindbergh
September 1, 2017 03:13
Re: [perl #132008] Term::ReadLine generates empty &STDERR files
Message ID:
Quoth Todd Rinaldo:
> The problem is that redirecting file handles to STDERR (open (my $fh,
> ">&STDERR)) cannot be done as a 3 arg open or it'll actually try to
> write to that file.

Yes, it can!

    open(my $fh, ">&", \*STDERR)

Getting Term::ReadLine to use this may involve breaking compatibility,
since the findConsole method assumes 2-arg open.  Is findConsole ever
called from outside the Term::ReadLine::* space?

/Bo Lindbergh

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About