use Term::ANSIColor; sub handle_err { print STDERR color('red'), @_; } use IPC::Run; run ['yourprogram', 'argument'], \*STDOUT, \&handle_err;