#!/usr/bin/perl -d use strict; use warnings; use Term::ReadLine; use Term::ANSIColor; my $attr = "This is a test"; print "$attr", "\n", colored("$attr", "red"), "\n", colored("$attr", "blue"), "\n", colored("$attr", "green"), "\n", colored("$attr", "black"), "\n";