in reply to Win32::Console::ANSI not working

Thanks for the help guys. Yes, the first response displays exactly my code. I forgot about the formatting tags so I couldn't get it to format, that's why I didn't type the entire script. Interestingly, I downloaded a 3rd party thing called "ansicon.dll" and installed it, now I can type text files that have those sequences in it and it displays color. However, the Perl code doesn't (whether I use Win32::Console::ANSI or not). Even more strange, the alternate way of setting screen attributes using Win32::Console does work.
my $console_handle = Win32::Console->new(STD_OUTPUT_HANDLE()); $console_handle->Attr($FG_CYAN); print "Multi-Edit 2008\n"; $console_handle->Attr($FG_WHITE); print "Normal text again\n";
The code above does work, and it displays cyan text and then bright white text. Why the ANSI codes stopped working is beyond me. It could have something to do with a Windows 8.1 update that made it stop working?

Replies are listed 'Best First'.
Re^2: Win32::Console::ANSI not working
by BrowserUk (Patriarch) on Aug 23, 2015 at 14:08 UTC
    Why the ANSI codes stopped working is beyond me. It could have something to do with a Windows 8.1 update that made it stop working?

    It's possible; but I would have expected to have heard about it before now if that were the case.

    Could you post the output from the command on the machine:

    set

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.
    I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!