use strict; use warnings; use Text::OutputFilter; use Term::ANSIColor; tie *STDERR, "Text::OutputFilter", 0, *STDERR, sub { color ("red")."$_[0]".color ("reset") }; print STDOUT "Normal\n"; print STDERR "Red?\n"; print STDOUT "Normal again?\n";