http://qs321.pair.com?node_id=520092


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