> I think of this as an idiomatic use which means exactly what you describe

It's a documented behavior of list assignments.

See perldata#List-value-constructors

Lists may be assigned to only when each element of the list is itself legal to assign to:

...

An exception to this is that you may assign to undef in a list. This is useful for throwing away some of the return values of a function:

($dev, $ino, undef, undef, $uid, $gid) = stat($file);

update

For the rest: Perl has the symbol undef acting like a constant for the "undefined value" and a builtin function undef(EXPR) to "undefine one variable" which also returns undef to the LHS.

It might be confusing that they are equally named, but I rarely use the function anyway.

PS:

since constants are just special functions in Perl, it could be that undef and undef(EXPR) are implemented in one (magic) operator which does constant folding when called without arguments. But that's an implementation detail, located somewhere between parser and op-tree.

undef

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery


In reply to Re^2: The three features of undef (renamed) by LanX
in thread Two meanings of undef by likbez

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.