Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: How to change the color of the text

by PilotinControl25 (Initiate)
on Sep 26, 2012 at 02:11 UTC ( #995668=note: print w/replies, xml ) Need Help??

in reply to Re: How to change the color of the text
in thread How to change the color of the text

I've inserted the ANSI code and it should display the whole output in another color correct? However it does not. What am I missing? Thanks.

#!/usr/bin/perl use Term::ANSIColor qw(:constants); print GREEN, open (FILE, "railcardata.txt"); while (<FILE>) { chomp; ($roadname, $roadnumber, $cartype, $interrr) = split(":"); write; } close (FILE); format STDOUT_TOP = ====================================================================== ROAD NAME ROAD NUMBER CAR TYPE INTERCHANGE RAILROAD ====================================================================== . format STDOUT = @<<<<<<<<<<<<< @<<<<<<<<<<<<<< @<<<<<<<<<<<<<< @<<<<<<<<<<< $roadname, $roadnumber, $cartype, $interrr . sleep 12;

Replies are listed 'Best First'.
Re^3: How to change the color of the text
by frozenwithjoy (Priest) on Sep 26, 2012 at 02:35 UTC
    "ANSI doesn't take"

    What do you mean by that?

Re^3: How to change the color of the text
by Anonymous Monk on Sep 26, 2012 at 02:15 UTC

    I've used ANSI also with great success...however I am stuck in this scenario no matter how I try and code it ANSI doesn't take...any suggestions in the code? thanks

    Maybe you ought to show that code?

    Does your terminal support ANSI escapes?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995668]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-08-30 21:31 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (423 votes). Check out past polls.