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

Hi, I see a piece of code as

 die "\e[5;31;42m ERROR: $lib_setup FILE does not exist in DIRECTORY: $setupDir/\e[0m\n" unless (-f "$setupDir/$lib_element");

can anybody help me to understand the symbol for "\e[5;31;42m" mean? thanks

Replies are listed 'Best First'.
Re: what does "\e[...." mean?
by tobyink (Canon) on Oct 29, 2012 at 08:21 UTC

    It's an escape code that may change the colour of the output text (depending on the terminal which the program is running in).

    Voodoo really; use Term::ANSIColor instead.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re: what does "\e[...." mean?
by BrowserUk (Patriarch) on Oct 29, 2012 at 08:18 UTC

    See ANSI escape codes


    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".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

      thanks for your and tobyink's reply