When you said while (<@dataarray>), I shuddered.
Indeed, when I saw it, I thought the code had not been really tested as claimed, for I could have bet it would have yielded an error. But this doesn't seem to be the case:
$ perl -MO=Deparse -e '@a=qw/a b c/; print while <@a>' @a = ('a', 'b', 'c'); use File::Glob (); print $_ while defined($_ = glob(join($", @a))); -e syntax OK
and actually IMHO by virtue of an (un?)fortunate chance:
$ perl -le '@a=qw/a b c/; print while <@a>' a b c
It seems that while (<whatever>)'s magic applies even if those angular parens are not to be interpreted as the IO-diamond operator but as the glob one. Now I wonder if this is a (perhaps unavoidable) side-effect or if it is intentional, although I doubt about the latter possibility.

Well, this may be a good subject for another question, or for a meditation... Update: done!


In reply to Re^2: grouping lines of data together for later use by blazar
in thread grouping lines of data together for later use by jonnyfolk

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.