Putting a space in the middle of a variable is just a wee bit different from indenting lines within a function.
Is it?

Yes, absolutely, without qualification, it is fundamentally different. Indenting everything within a block is a strongly-recommended best practice in good coding style, because it greatly enhances clarity. Being told that I shouldn't do that with POD is as far as I'm concerned a good enough reason in itself not to use POD (within blocks -- which is where I wanted to put the information in question), because I would have to adopt an unclear coding style in order to do so. Now I understand why people who use POD stick it all in big huge chunks, rather than interspersing it through the code like comments -- because fundamentally it's not designed to be interspersed the way comments can be. (I had been led to believe otherwise.)

Putting whitespace in variable names (as, $foo {bar}) is something I would do in an obfuscation, to make the code *less* clear. If it alters the meaning, so what? It isn't something I'd normally expect good code to ever do, so at worst it's a very minor gotcha.


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

In reply to Re: Worst thing you ever made with Perl by jonadab
in thread Worst thing you ever made with Perl by Juerd

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.