Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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]
[Discipulus]: it seems some signal is issued but only by services
[Discipulus]: which one choroba?
[choroba]: Perlingo
[Discipulus]: Perl In Go?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-01-17 09:29 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (154 votes). Check out past polls.