Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: STDERR going to string

by salva (Monsignor)
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2014-07-14 05:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (255 votes), past polls