I quote perldoc -f scalar:
Because "scalar" is unary operator
So no it's not a function call at all, even if looks like one. (Just like split.)
$ perl -MO=Terse -e'scalar @_' LISTOP (0x8133508) leave [1] OP (0x8133370) enter COP (0x8133400) nextstate UNOP (0x81333c0) scalar UNOP (0x8133630) rv2av [1] SVOP (0x8133540) gv GV (0x8124334) *_ -e syntax OK $ perl -MO=Terse -e'$#_+1' LISTOP (0x8133440) leave [1] OP (0x8128040) enter COP (0x8133400) nextstate BINOP (0x8133508) add [2] UNOP (0x81333c0) av2arylen UNOP (0x8133630) rv2av [1] SVOP (0x8133540) gv GV (0x8124334) *_ SVOP (0x8133370) const IV (0x8132bdc) 1 -e syntax OK
Certainly looks like $#arr + 1 loses that argument as well. Not that it mattered in the first place..

Makeshifts last the longest.


In reply to Re^2: Timing of Array-Size Determination Methods (scalar() != function) by Aristotle
in thread Timing of Array-Size Determination Methods by Itatsumaki

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.