in reply to Re^2: foreach with array elements problem
in thread foreach with array elements problem

as long as it is a scalar, however you must realize the difficulty that this schema introduced, as it is not possible to determine the type of an array element statically, thus it is wise not to introduce what you wanted into a language.
As a matter of fact, array elements can only be scalars. perldata is quite clear about this, but what probably leaves no doubt is perldsc:
The most important thing to understand about all data structures in Perl -- including multidimensional arrays--is that even though they might appear otherwise, Perl @ARRAYs and %HASHes are all internally one-dimensional. They can hold only scalar values (meaning a string, number, or a reference). They cannot directly contain other arrays or hashes, but instead contain references to other arrays or hashes.

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.
  • Comment on Re^3: foreach with array elements problem