Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I have stumbled across the most cleverly hidden secret of all time!

"What is it?", you ask, "What?", even "Huh?"

"Tell us more!", you demand, "You'd better tell!" No need to yell or get nasty. I hear you, I hear you! And please, do not all talk at once. Two voices are more than enough for me to bear.

Please allow me to share with you how it has forever changed me! We are a new man! Yes we are my precious. All will be made known soon enough. In the proper time and in the proper way, all will be made manifest. For you see, it is my duty, Nay!, my destiny! to reveal it to all of you. Oh my. I have been rambling. You must forgive me but I have been altered by this discovery! And I cannot stop talking about it and its effects.

"The discovery!", you say. Yes! The discovery! I should get started telling you about it! It... It is simply... marvelous!!! Oh my! It is so difficult to find the words to express my findings. But I shall attempt it...

If you blend certain words and symbols together in a certain way, you get the usual, the expected result. Take this program for example:

print &{'Just Another Perl Hacker'},$/; sub AUTOLOAD{ *$AUTOLOAD=sub{(split'::',$AUTOLOAD)[1]}; goto&$AUTOLOAD; }
Pretty easy to follow right? Of course it is. It doesn't do anything unexpected at all.

Now let me show you a funny variable trick:

${'::*&^%$#@!'} = 'Just Another Perl Hacker'; print ${$::{'*&^%$#@!'}},$/;

Here is another example that (while less than sane) is prefectly valid:

_10: print "Just Another Perl Hacker\n"; _20: goto _10;

But! by simply twisting the words and symbols around in a most peculiar fashion; creating new and unusual "phrases"; you will witness a most, uh, interesting outcome. Yes, interesting... It changes everything! Everything I tell you!!!

Argh!!!! I simply cannot express it in words... No! no my precious, I tried. True! I tried! It does involve words but words alone cannot convey the deeper meaning. Nay! One must be shown, yes! one must be shown! Come my precious! We will show them.

#!/usr/bin/perl -w use strict;sub t{map{chr($_)}@_}sub l{return(split' ',&s)[0=>1]} BEGIN{$%=2=>$;[0]=23=>$;[1]=$;[0]++=>$;[2]=3;@;=&t(@;)=>$^H^=$%} $.=-${$;[1]}=>$!=$:=~s/\s//g=>$!++=>$?=$=/$!/($%+$!)=>$=/=$!;$~= substr((split/[\/\\]/=>${$;[0]})[$.]=>$[=>$?)=>@~=split//,$~;$^= qq#h$~[${$;[1]}]$~[$!]$~[$|]#=>@~=qx/$~$"$:$:$^/;$=++if(@~==30); $~=$~[$=]=>$^=substr($~=>index($~=>$:)+${$;[1]}=>${$;[1]})=>1,0; $@=::j(),1,0,1,0,0=>1=>1=>0=>1=>0;$b='_',1,0,1,0,0,1,1,0,1,0;*$b =sub{$~=shift;$~->($b,@_);};goto&{$@->$^};sub s{unpack($^,$@->_) };sub j{$a={_=>'92G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R"@``',};$;=sub{ $:=shift;$a->{$:};};bless($;);$;;}sub u{die(&i);}sub v{(split' ' =>&s)[2=>3]}sub i{join' '=>(&l=>join(''=>&t(@{&e}))=>&v=>$/)}sub e{[69,118,105,108]};sub p{'Just'}sub r{'Hacker'}sub o{'Another'}

See? Do you see it? Isn't it amazing? Yes my precious, it is very impressive! Who would have guessed it? By mixing certain words and symbols into complex phrases the outcome twists around and... and... becomes evil. Oh so... evil! It is everywhere. Beware the evil! Or you too might be corrupted. I've said to much my precious?

Now I must go. My precious says so. I must obey my precious. Farewell!

Updated: Added post number to title.

Updated!: Patched code to work with 5.8.x. Thanks broquaint and The Mad Hatter for testing. jeffa tells me that it also works on 5.6.0! Fixed yet another sneaky bug thanks to katgirl!


In reply to The Most Cleverly Hidden Secret of All Time! (666th post) by Mr. Muskrat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found