using Perl I am trying to push the elements of an array to another array, and not the whole array. But I'm not getting my goal.
I tried this:
push @tmp_entities_all, @tmp_entities;
But I got the whole small array as an element in the bigger array.
Then I tried it with a loop:
for (@tmp_entities) {push @tmp_entities_all, $_;}
But the same results, the whole @tmp_entities appears as an element, and that what I dont want.
I need one dimension in the array and not array of arrays!! Should I cast something before pushing? or what is the problem?
Thanx a lot.
@tmp_entities_allafterpushbyuse Data::Dumper; print Dumper(\@tmp_entities_all);and include the output in your question.perl -e '@a=(1,2,3,4); @b=(5,6,7,8); push @a,@b; print "@a\n";'as you can see what you are asking should work