in reply to Flush all opened STDIO streams

Try Capture::Tiny

Replies are listed 'Best First'.
Re^2: Flush all opened STDIO streams
by dmitnin (Initiate) on Feb 03, 2014 at 14:20 UTC

    List, what I tried to use:

    1. Reopen STDERR to variable;

    2. Reopen STDERR to file;

    3. Capture::Tiny and some others (sorry do not understand already);

    4. Make hook on $SIG{__WARN__}

    5. Use eval {}

    I figured out slowest and ugly solution: write my perl code to an individual script, and system() or `backtick` it with grabbing stderr.