Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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.

$/ = 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://531023]
[thezip]: How goes it, Corion?
[Corion]: thezip: Quite good, after a one week vacation in the sun ;)
[Corion]: I hope you're well too!
[thezip]: Where did you go? We've already set a record for all-time February rainfall here.
[Corion]: thezip: The Canary Islands - they have a constant climate

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-02-23 17:01 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (349 votes). Check out past polls.