Well, you started claiming an analogy between builtin functions and named operators. :)

"builtin function" is another name for "named operator". No analogy was made between the two.

I understand your point even less.

Already the fact that you can assign a list, i.e. my(LIST)=LIST is beyond the normal patterns of lvalue sub

How would changing my affect that statement?

I don't understand this point either.

An operator working on lists of variables having a special behavior in scalar context is IMHO strange!

No operator or builtin or sub can return more than value in scalar context. It simply makes no sense. The only reason you're in scalar context is because what will receive the value cannot handle more than one value.

map, sort, grep, reverse, and more all work on lists and behave specially in scalar context. What about keys, values, split, splice, m//g, s///g, and more whose primarily purpose is to return a list? They all return something else in scalar context.

I don't see what you find strange.


In reply to Re^9: why doesn't "my ($a,$b)" return a list? by ikegami
in thread why doesn't "my ($a,$b)" return a list? by LanX

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.