The difference between a list and an array is often ignored...
Indeed; for never iterates over an array. for always iterates over a list.

What do either of those mean? Based on later replies, it seems like people are interpretting it in terms of whether or not $_ is an alias or a copy. But saying "$_ is an alias" or "$_ is a copy" actually means something clear.

Is there some other meaning? For example, when foreach is given an array, it might make a new list of aliases to each array member and then iterate over that list, and thus not ever directly iterating through the array. Now that I think of that, it fits what you wrote quite well, but doesn't match how others interpretted it. I guess this behavior matters if you modify the array (adding or removing members) while you are in the loop and I suspect that is what foreach does.

Is that all that you meant or are there other aspects?

imp, what did you mean?

- tye        


In reply to Re^2: RFC - FAQ for Modification of a read-only value attempted ("list"??) by tye
in thread RFC - FAQ for Modification of a read-only value attempted by imp

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.