Maybe I'm being pedant here, luckly this answer is on the 4-th indentation. My point of view is that I would like to understand why things work this way. I can be perfectly happy with the behaviour described in the docs, but I'd like to know why and I'd like that the docs would be clearer about this issue.

If the issue is about context, I'd accept it. wantarray is a function dealing with context, and if the docs would say that if you have no context, you have no use for wantarray it makes perfectly sense for me.

OTOH, if the docs talk about "top of file" (whatever this means, BTW), I'm not happy. I'd like to understand what "top of file" means, and also why this "top of file" invalidates the possible usage for wantarray even when I provide a context. In other words, I'm not willing to accept this behaviour blindly only because the docs say it's so. "Why doesn't this work?" - "Because no" isn't acceptable from a super-language like Perl, and is something that is definitively under the excellent Perl documentation standards.

I appreciate your examples. But they simply talk about something that makes sense: use undef only on the "basic" types you have in Perl, not on "derived" ones like slices. I understand that there could be programming issues that make this a possible point of variations for the future, and also that a line between "basic" and "derived" is a well drawn line for things like that.

Imagine if you found that you could use undef on all variables, except those whose name start by "T". Wouldn't this surprise you, and deserve at least a bit of elaboration?

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

In reply to Re^4: wantarray documentation in 5.8.7 by polettix
in thread wantarray documentation in 5.8.7 by polettix

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.