True. And (for the first time here:), I actually knew that.

However, as I understand it, when I defined my @list, I actually defined a typeglob named *list which contains one each of a scaler, an array, a list and a hash all named list (and accessable locally with the appropriate funny character prefix).

Moreover, when one iterates over @list using one of the foreach or for...in constructs, the scaler $list is automagically (sorry. I forgot the correct term) set to the next value from @list at each iteration. Hence, my attempt to use that.

The problem in this case (thanks to jeffa!), is that the iteration in being performed outside of my scope, so $list is never being set.

At least that is my understanding at this point. Maybe someone will correct me if I have this wrong.


In reply to Re: Re: Using list elements within lists contexts with the distributive properties of HTML shortcuts by Anonymous Monk
in thread Using list elements within lists contexts with the distributive properties of HTML shortcuts by Anonymous Monk

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.