I think putting subroutines at the end was a requirement of BBC Basic1 which is where my coding started...well, actually it started before that with Shape Tables on an Apple II. Two of them had been purchased by the school the year I started at grammar school - that's a long time ago!

Until very recently I always used a leading & for subroutines - I didn't realise it was optional generally a bad idea.
I think I always add parenthesis to user-defined functions so unwittingly follow that style directive.

Don’t use unnecessary parentheses for builtins and ‘honorary’ builtins

Is an 'honorary' built-in something that is very common but not part of Perl language?
Something like fetchrow_array in DBI or get in LWP::Simple.

I was surprised to see item 122 on the list...
Don’t use subroutine prototypes
Surely prototypes, in some circumstances, are extremely useful.

1 - Incidentally, the BBC Micro turns 40 this year!


In reply to Re^6: Dereferencing in blessed object by Bod
in thread Dereferencing in blessed object by Bod

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.