I have a array reference, which points to other arrays. What I would like to do is to add more data to the array before I print it out.
print code:
for my $col (@array) { for my $row (@$col) { print "$row\n"; } }
say I have a new array
How do I add that to array @array ? I'm probably overlooking over something easy. I know I can't use 'push' because the elements of @array are references.my @new_array = qw ( foo bar foobar barfoo );
Any help would be appreciated.
In reply to Adding elements to a array reference by TASdvlper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |