Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

what does "\e[...." mean?

by skyworld_chen (Acolyte)
on Oct 29, 2012 at 08:16 UTC ( #1001315=perlquestion: print w/ replies, xml ) Need Help??
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

Comment on what does "\e[...." mean?
Download Code
Re: what does "\e[...." mean?
by BrowserUk (Pope) 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
Re: what does "\e[...." mean?
by tobyink (Abbot) 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'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2014-09-16 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (33 votes), past polls