Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Capturing stderr

by 0xbeef (Hermit)
on Dec 31, 2005 at 01:08 UTC ( #520092=note: print w/replies, xml ) Need Help??


in reply to Re^2: Capturing stderr
in thread Capturing stderr

I once asked a similar question in Redirecting stdout/stderr to pipe. Thelonius described a method in (Re: Redirecting stdout/stderr to pipe) that captures stdout as well as stderr (seperately) to array references (see the @$outref and @$errref portions of the code).

The code also includes detection of commands that have been running for too long or when the array's output size exceeds $g_maxlines lines.

0xbeef

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://520092]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2022-05-25 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?