If you are on a *nix system you should check out Term::ANSIColor.
In reply to Re: unerline or highlight keywords in a string by zek152 in thread unerline or highlight keywords in a string by rizzy