Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw


by Roy Johnson (Monsignor)
on Oct 21, 2005 at 17:42 UTC ( #502080=obfuscated: print w/replies, xml ) Need Help??

A little quickie. Its novelty is that it doesn't simply unscramble itself to generate its output. I can't guarantee it will run on every system, but I think it should, if you have a complete installation of Perl. It certainly works with ActivePerl.

Bonus points if you guess what the F in the title is for. (No, it's not vulgar.)

s;;^(?:.*) -+ [\$^]|;,y/?$)](:.[*^+/racheldjopq/for$ARGV[0];print/"(.* +)"/for<>
Update: ambrus notes that changes in 5.10.0 cause it to print twice.

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
by ambrus (Abbot) on Oct 21, 2005 at 21:33 UTC

    Congratulations, you have found the Mirror of Erised.

    It must be a bad feeling to read about this, but I still have to tell that at least three people have found this idea before you (and one of them was me): the previous japhs are Opere Citato Japh, One-liner japh, Just Another JAPH, and a later one is Perl FAQ.

    However, I think your implementation is the best of all in that it hides the

    (Update: so well in fact, that I might not even have noticed anything if it wasn't for Not_a_Number's reply. Pity he didn't use spoiler tags for the F-word.)

    Also note that your japh has a good idea that's worth mentioning in a reply. Most japhs don't have any idea, and just put the overused ideas (like s with strange delimiters, punctation vars) to a visually new form. Some of my japhs are prone to that too.

      Shucks, instead of each of us re-inventing the wheel, why isn't there a module for this?

      Oh, wait, there is. ;-)

      Caution: Contents may have been coded under pressure.
by Not_a_Number (Parson) on Oct 21, 2005 at 17:58 UTC
    Bonus points if you guess what the F in the title is for.


    Update: Forgot to say that I liked it very much. Roy Johnson++.

    BTW, it seems to have become even more obfuscated since I first looked at it...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://502080]
Approved by ktross
[Corion]: I mostly wonder how I can add this "reversal" to my toolchest, and if it's worth it or just clever
[choroba]: It should greatly simplify the parsing code, no flags or additional reading of the next buffer needed
[Corion]: choroba: Yeah, that's why I like that approach; it seems even quite obvious in retrospect to me, but many things are in hindsight ;)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2016-12-06 15:38 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (109 votes). Check out past polls.