Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am changing my perl script from windows to Linux for that can I use Win32:: Console in Linux Systems

use Win32::Console

Replies are listed 'Best First'.
Re: I want to use Win32::Console in Linux is it possible?
by Corion (Patriarch) on Mar 23, 2022 at 11:53 UTC

    No. Win32:: modules are usually for Windows only.

    Depending on the functionality you need, you can get by by using some of the Term:: modules maybe.

      I want to use for these function for the Win32:: Console in Linux

      our $console = Win32::Console->new(STD_OUTPUT_HANDLE); our $CurrentConsoleColor = $console->Attr; our $BackgroundColor = $CurrentConsoleColor & (BACKGROUND_RED|BACKGROU +ND_BLUE|BACKGROUND_GREEN|BACKGROUND_INTENSITY);

        If you are only concerned with colours, then Term::ANSIColor might be a good place to start.


        🦛