johnnywang has asked for the wisdom of the Perl Monks concerning the following question:
How do I capture this in the main script? i.e., in the main script, I'll call foo(), wait for it to exist, and capture everything it printed to STDERR, I'll then process that string.use strict; sub foo(){ # this could be a loop that takes some time to finish. print STDERR "Something to worry about\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to capture STDOUT/STDERR of a function
by Zaxo (Archbishop) on Aug 31, 2004 at 05:02 UTC | |
by Anonymous Monk on Aug 31, 2004 at 18:07 UTC | |
by Zaxo (Archbishop) on Aug 31, 2004 at 18:13 UTC | |
by johnnywang (Priest) on Aug 31, 2004 at 18:09 UTC | |
Re: How to capture STDOUT/STDERR of a function
by Arunbear (Prior) on Aug 31, 2004 at 10:30 UTC | |
Re: How to capture STDOUT/STDERR of a function
by sintadil (Pilgrim) on Aug 31, 2004 at 16:46 UTC | |
Re: How to capture STDOUT/STDERR of a function
by gmpassos (Priest) on Aug 31, 2004 at 17:36 UTC | |
Re: How to capture STDOUT/STDERR of a function
by DrHyde (Prior) on Sep 01, 2004 at 08:45 UTC |