http://www.perlmonks.org?node_id=523130

Okay here I go with another 'wanna be oneliner-obfuscated bit of code' (there are a lot of perl and perl-obfuscation masters here in perlmonks, i cannot compete with, but i can try to follow their steps ...!) ...

perl -e '$idx=rand(@ARGV);$ARGV[$idx]=~s/x((?:\d|[a-f])+)/chr(hex("$1" +))/ge;@ARGV=split/\s/,$ARGV[$idx];sub japh{undef$f;(*japh=sub{JaPH},r +eturn)unless($i<@ARGV);$i+=int(++$j/$t);($j%$t==0)and($j=1,$l=length( +$ARGV[$i]),$l+=$l>2?2:10,$f=" "x$l."\b"x$l);$ARGV[$i]or JaPH};$t=10;$ +_=qq(\r|);$|++;m{(?>.)(?{print$f;tr|\|\/\-\\|\/\-\\\||;select("",""," +",0.10);print;print&japh;})(.)(?{($o=$1)=~tr|\/\\|\\\/|;print$o})$}gw +hile 1' \x54\x68\x65\x72\x65\x20\x49\x73\x20\x4d\x6f\x72\x65\x20\x54\ +x68\x61\x6e\x20\x4f\x6e\x65\x20\x57\x61\x79\x20\x54\x6f\x20\x44\x6f\x +20\x49\x74 \x4a\x75\x73\x74\x20\x41\x6e\x6f\x74\x68\x65\x72\x20\x50\x +65\x72\x6c\x20\x48\x61\x63\x6b\x65\x72 \x42\x6f\x72\x6e\x20\x54\x6f\x +20\x42\x65\x20\x57\x69\x6c\x64 \x75\x73\x65\x20\x73\x74\x72\x69\x63\x +74

Do not worry about the string encoded as its decimal ascii code; it is not any malicious shellcode ;) ...

My Initial intention was code some regex code that match a patern contineously ... something like an infinite loop inside a regexp without using any loop statement ...
I suposse i failed :'( ... to much code for shuch a simple thing:

perl -e '$_=qq(\r|);$|++;m{(?>.)(?{tr|\|\/\-\\|\/\-\\\||;select("","", +"",0.10);print})(.)$}gwhile 1'

Do you thing my fellowship PelrMonks, if there is any way to do the same in a shorter way? ... It's only curiosity ;) ...



... Although, the final result was not so bad, isn't it?

turo

PS: It would be funny to use this 'helix' for composing an perl animated ascii art hat:

---.--- (___)__ o.o -- =``||``=
(Not so good as an ascii grapher ...)

perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'