Adding color to print to console?

Discussion in 'Perl Misc' started by Janek Schleicher, Jul 22, 2003.

  1. Buteo Lagopus wrote at Tue, 22 Jul 2003 14:29:45 -0500:
    > I'd like to know how to hilight/color/invert the numbers so I can get rid
    > of the "Hit..." information.
    >
    > Can this be done and can someone steer me to some examples? Will this
    > then be OS specific?


    It's specific to your output method (terminal, html, tk, ...)

    If you work with an ANSI terminal, have a look to the CPAN module
    Term::ANSIColor


    Greetings,
    Janek
     
    Janek Schleicher, Jul 22, 2003
    #1
    1. Advertising

  2. I have my lotto ticket checker "PERLotto.pl" that prints to the console
    winning hits for games but it has no "glitz." I thought, could I hilight
    the color of the matching numbers in the print statement?

    Currently a print line looks like this:

    01 02 03 04 05 06 --5b Hit: 01 02 03 04 05 06

    I'd like to know how to hilight/color/invert the numbers so I can get rid
    of the "Hit..." information.

    Can this be done and can someone steer me to some examples? Will this
    then be OS specific?

    Thanks,

    All the best,

    Andy
    print "What can possibly go wrong... go wrong... go wrong..."
     
    Buteo Lagopus, Jul 22, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Finney
    Replies:
    2
    Views:
    1,020
    Egor Bolonev
    Jun 30, 2003
  2. Egor Bolonev
    Replies:
    0
    Views:
    494
    Egor Bolonev
    Jun 30, 2003
  3. keto
    Replies:
    0
    Views:
    1,024
  4. David Cournapeau

    print a vs print '%s' % a vs print '%f' a

    David Cournapeau, Dec 30, 2008, in forum: Python
    Replies:
    0
    Views:
    390
    David Cournapeau
    Dec 30, 2008
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    467
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page