my $can_color = 0; eval { require Term::ANSIColor; }; unless ($@) { ## I tried these next two lines but it does NOT seem to work (complains about the constants not being defined)... Term::ANSIColor->import(); Term::ANSIColor->import(qw(:constants)); $Term::ANSIColor::AUTORESET = 1; $can_color = 1 }