http://www.perlmonks.org?node_id=761776


in reply to Re^2: foreach doesn't select array element
in thread foreach doesn't select array element

I think you may be confused about Dumper output, and perhaps about what's actually in your arrays. In your first example:
\@arr = [ 1, 2, 3, [ anna, beth, christie, denise ], ]
the fourth element in your array is an array ref, not an array. You can only store scalars in an array, so the only way to store an array in another array is to store a reference. The output you show in the second part:
\[ anna, beth, christie, denise ],
would actually mean a reference to a reference to an array.