Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

goBoating help me! perl color question

goBoating help me! perl color question

goBoating help me! perl color question

Have u ever gotten color to work in perl? win32 system.


use Term::ANSIColor;
print color("red"),"red color should be here", color("reset");


here is the output:
red color should be here

RE: goBoating help me! perl color question

never tried......looks interesting though.....I'll poke around a little

keep the rudder amid ship and beware the odd typo

RE: goBoating help me! perl color question

I've done a little playing.  I am running into the same behavior you are with Term::ANSIColor.
....'just thinking (typing) out loud......I suspect that the Win32 'dos' window is not ANSI compliant.  I can't find any specifications on the 'dos' window to determine if this is the case.  The Term::ANSIColor module is ANSI specific.

However, there is a color dos command for controling foreground and background color.  You could call that from your Perl.

You can make system calls to mod the appearance of the window.

system("color 37");
print <<EndPrint;
Some grey text in an aqua screen.
The first digit is background color and second is foreground(text).
See windows help->dos->Command Index for help on color codes.
Type color at the prompt to reset to defaults.

Is Tk an alternative?  It provides alot of GUI function and is not to difficult to play with.

'hope this helps

keep the rudder amid ship and beware the odd typo

RE: goBoating help me! perl color question

ya i had a feeling that the ansi color was not supported in dos. The system call changes the entire screen. But it doesnt change just the part of the text that i want. I think we are fighting a lost cause here. hehe. But thanks for the help.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close