You're probably going to bore your visitors with any kind of beautiful code, whatever this means for you or anyone else. Why? Because they haven't done any "programming" more complicated than HTML, so what do you expect to be their taste in fact of programming beauty?

My personal 2c would be showing them the Schwartzian Transform: marvelous, but not exactly what's readable for the newbie. But maybe all splendid Perl isn't immediately readable for the newbie, because (s)he is (at best) used to read and understand the basic control structures common to many languages, surely not some corners that make Perl an everyday discover (for me). Continuing on this line, any simple use of regex make Perl very attractive for texts, and beauty often means attractive :)

But if I were you, given your expected audience, I would put this, which is probably the most beauty piece of code I've seen in years (and it keeps being beauty even when you de-obfuscate it :).

Flavio

Don't fool yourself.

In reply to Re: Beautiful Perl by polettix
in thread Beautiful Perl by BrentDax

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.