{ prototype / parsing issues }
I fail to see your point here. There's nothing implicite going on here. sin takes an argument, and hence what follows is parsed as an expression (so the slash is the start of a regex). time doesn't take an argument, hence what follows is parsed as an operator (so the slash is a division).

Confusing for people who can't deal with context sensitive tokenizers, but that has nothing to do with implicite things.

Why is it OK to use implicite arguments for shift?
Because it isn't ambiguous.
Not putting a 'return' before the last statement of a subroutine isn't ambiguous either. The last expression executed in a subroutine will be the value returned from that subroutine. Always. Without exception.

It seems to me that you think Perl gives one too much rope to hang yourself. That's ok. I think Perl does that for the majority of the coders. But I also think that if you find Perl too scary, or that if you want to limit yourself to a small subset of Perl because there are many features you find confusing or unclear, you should stop programming in Perl, because your mindset just doesn't fit Perls. Nothing wrong with that, there are many other languages that will fit you better.


In reply to Re^12: "advanced" Perl functions and maintainability by Anonymous Monk
in thread "advanced" Perl functions and maintainability by geektron

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.