Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: STDERR going to string

by salva (Abbot)
on Oct 11, 2011 at 14:20 UTC ( #930827=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use File::Temp qw(tempfile);
    use Inline 'C';
    ...
    # fileno STDERR: 2
    # |foo!|
    # ERROR
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    # here, it outputs:
    # ERROR goes to (*(*Perl_IStdIO_ptr(((PerlInterpreter *)Perl_get_conte
    +xt())))->pStderr)((*Perl_IStdIO_ptr(((PerlInterpreter *)Perl_get_cont
    +ext()))))
    
  3. or download this
    open my $olderr, '>&STDERR'; # save STDERR
    my ($fh, $fn) = tempfile();
    ...
    # |foo!Died at -e line 1.
    # |
    # ERROR
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://930827]
help
Chatterbox?
[choroba]: Interesting Regexp::Debugger issue
[Corion]: Most likely Regexp::Debugger uses something in main:: ;)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2017-09-25 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (291 votes). Check out past polls.

    Notices?