Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Spatial Japh

by chargrill (Parson)
on Feb 17, 2006 at 17:51 UTC ( #531023=note: print w/replies, xml ) Need Help??


in reply to Spatial Japh

If your terminal/putty/shell window stays colored after running this (as mine does, which is a little annoying :) and you're not familiar with shell escapes for colorizing foregrounds/backgrounds of terminal/putty/shell windows (as I wasn't), be sure to have on of these handy for resetting your colors to the way they were:

perl -e 'printf "\e[0%dm", 0'

:)

Update: D'oh! Yes of course. I was busy just replacing the line from the excellent explanation above:

printf "\e[$escape;%dm", int(rand 6) + 101 - 60 * ($is_windows || 0);

... with something that wouldn't leave my window a different color that I didn't even bother to shorten it beyond printf "\e[0%dm", 0. But seeing liverpole's comment below, I feel completely silly for not "golfing" it further.



--chargrill
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );

Replies are listed 'Best First'.
Re^2: Spatial Japh
by liverpole (Monsignor) on Feb 17, 2006 at 18:34 UTC
    A good point.

    You can make it even easier to remember by golfing it to:  perl -e 'print "\e[m"'


    @ARGV=split//,"/:L"; map{print substr crypt($_,ord pop),2,3}qw"PerlyouC READPIPE provides"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://531023]
help
Chatterbox?
[shmem]: erix: bad idea. PerlMonks is based on everything
[robby_dobby]: shmem:everything2
robby_dobby says Sorry and points to his boredom
[shmem]: robby_dobby: since everything is everything, it is thus also everything2. And everything2 is based on... you name it.
[Corion]: Mhhmmm. I just had to remind two contractos of their priorities from my point of view. This felt somewhat like getting my godson+siblings to clean their room, including the evil eye I threw them ;)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2017-04-25 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (454 votes). Check out past polls.