http://qs1969.pair.com?node_id=30356


in reply to In an array of arrays, how do I print the whole array or bits of it?

Basically, you write a program to do what you want. :) See the previous respondant for examples. Perl has number of builtins to facilitate array operations, such as foreach, map, and grep. For example, if you have a blended array of values and references, you can do this:
my @lol = ([1, 2, 3], 'x', [qw(A B C)], 'foo'); print join "\n", map {ref $_ ? join ', ', @$_ : $_} @lol;
Additionally, you may wish to look at the Data::Dumper module, which can display complex data structures in a human readable format.
  • Comment on Re: In an array of arrays, how do I print the whole array or bits of it?
  • Download Code