I finally got around to writing a piece of obfuscated perl. Here is its story.

One of the many subjects I have to do it progamming (in Matlab). I told the teacher (good guy) about Perl and to my shock and horror he had never heard of it. Aha, I'll bring my laptop in (Debian), says I, and show you some: Good he says and why not rewrite today's exercise in Perl for me? No problem says I, and, being the sneaky, underhand little sh*t that I can occasionally be I re-wrote it for him. Here it is, my first ever JAPH:

#! /usr/bin/perl -w use Math::Complex; $zxa=abs(1+(-exp(1)**(i*pi))-(exp((sqrt(9)/3)-sqrt(1))));$xza="vppnabo +vs";$axz=$zxa-((-exp(1)**(i*pi))**(-exp(1)**(i*pi)));$xza=~tr{s\\\r\n +\b\f}{S};$azx=(1*(10**(int(pi-($zxa*2)))));push@zax,$axz;push@zax,$zx +a;$xza =~ tr/A-Za-z/N-ZA-Mn-za-m/;while ($xza=~s/^(.)//){unshift @xaz +, $1;}for ($xaz=1;$xaz<=$azx;++$xaz){$zax=$axz+$zxa;push@zax,$zax;$ax +z=$zxa;$zxa=$zax;}print"\n".(join"",@xaz).":\n".(join" ",@zax)."\n\n" +;

Hope you enjoyed it praying that my typing was correct. I don't think it'll ever be a classic but I like it all the same (It cost me 2 hours work, 1.5 Litres of minty syrup stuff and about half-a-pound of pretzels.) Just for the record I did also write an unobfuscated version but he gets this one first!

Elgon

Update:All typos corrected, so should work fine ... I hope


In reply to First ever japh: so be nice! by Elgon

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.