|Syntactic Confectionery Delight|
Re^3: Passing multiple arrays to foreach loop (list flattening)by LanX (Bishop)
|on May 12, 2013 at 12:19 UTC||Need Help??|
From all the answers you got, the one from Athanasius was IMHO the best so far.
It's elementary for Perl that @arrays and %hashes are flattened in list context, not only in the case of a foreach (LIST), but whenever the docs talk about "LIST" as parameter.
from perldata#List value constructors
LISTs do automatic interpolation of sublists. That is, when a LIST is evaluated, each element of the list is evaluated in list context, and the resulting list value is interpolated into LIST just as if each individual element were a member of LIST. Thus arrays and hashes lose their identity in a LIST--the listfor instance
( addicted to the Perl Programming Language)