in reply to Re: Flush all opened STDIO streams
in thread Flush all opened STDIO streams
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.
|
|---|