Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: How to print colored word in text file

by hdb (Prior)
on Jun 21, 2013 at 11:16 UTC ( #1040129=note: print w/ replies, xml ) Need Help??


in reply to Re: How to print colored word in text file
in thread How to print colored word in text file

Have you been able to use this successfully in Windows cmd.exe? I have tried but it did not work (at least in Windows 7 that I have).


Comment on Re^2: How to print colored word in text file
Re^3: How to print colored word in text file
by RichardK (Vicar) on Jun 21, 2013 at 12:02 UTC
    No, sorry but I don't run windows. I thought it worked to some limited extent on windows, but I guess I'm wrong.
Re^3: How to print colored word in text file
by ww (Bishop) on Jun 21, 2013 at 12:02 UTC
    Same problem as hdb; may be user-error, but I can't recall ever (on M$ osen) making Term::ANSIColor work as advertized.

    If you didn't program your executable by toggling in binary, it wasn't really programming!

      I haven't tried doing colored text in a Windows command prompt before. However, I know that Damian Conway's Regexp::Debugger module is definitely creating colored text within a command prompt on Windows 7. It looks like he's using Win32::Console::ANSI to get the colored text to show up in the command prompt.

        Thanks a lot this works for me. Example I tried from the documentation:

        use Win32::Console::ANSI; print "\e[1;34mThis text is bold blue.\e[0m\n"; print "This text is normal.\n"; print "\e[33;45;1mBold yellow on magenta.\e[0m\n"; print "This text is normal.\n";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2015-07-05 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls