tsvi.tenebaum has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I want to catch all STDERR and STDOUT prints and send it to a function as an argument. thanks for your help

Replies are listed 'Best First'.
Re: send STDOUT STDERR to function
by karlgoethebier (Abbot) on May 12, 2013 at 12:11 UTC

    Please see also Capture::Tiny. Very handy.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Re: send STDOUT STDERR to function
by kcott (Archbishop) on May 12, 2013 at 11:27 UTC

    G'day tsvi.tenebaum,

    I think you'll find most of what you need in the open documentation. In particular, look for:

    "Here is a script that saves, redirects, and restores STDOUT and STDERR using various methods: ..."

    -- Ken

Re: send STDOUT STDERR to function
by Khen1950fx (Canon) on May 12, 2013 at 12:01 UTC