Thanks, BrowserUk and all. Now the code is working fine.
In reply to Re^2: How to use Term::ANSIColor module?. by perlsen in thread How to use Term::ANSIColor module?. by perlsen