This was more the thing I had in mind when I started this debate. You see, when asked my mindset was heavily into dereferencing due to working on writing a program to extract data from a hashref of a hashref of a hashref. So it was probably mostly due to that that I responded the way I did instead of using the more familiar, and readable, scalar(keys %hash)).

To me, this is the great advantage, as well as the greatest potential hazard, of using perl. It is easy to write code differently depending on how you are thinking at the time, the phase of the moon, the weather, the day of the week and a million other reasons. What I was interested in seeing was, not who can obfuscate; we have another section for that, but who has written down any of those little syntactic gems that are only possible in a language like perl.

This page is intentionally left justified.


In reply to Re: Re: Little things ;) by Caillte
in thread Little things ;) by Caillte

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.