in reply to color STERR red?
How do you launch them?
If you do it with require or do, the IO layers mentioned in the replies above will work.
If you launch them as separate processes (system, fork + exec, backticks) then you'll have to capture STDERR, color it and re-emit it.
For that you might want to use something like IPC::Run with a callback for handling STDERR:
use Term::ANSIColor; sub handle_err { print STDERR color('red'), @_; } use IPC::Run; run ['yourprogram', 'argument'], \*STDOUT, \&handle_err;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: color STERR red?
by Tux (Canon) on May 09, 2011 at 06:31 UTC | |
by rastoboy (Monk) on May 10, 2011 at 02:19 UTC |