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:
and actually IMHO by virtue of an (un?)fortunate chance:$ 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
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.$ perl -le '@a=qw/a b c/; print while <@a>' a b c
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |