perlquestion
Anonymous Monk
Dear monks,
I have two arrays, each containing the same number of elements. I want to create a new array whose elements are concatenated elements from the first two arrays, in which the first element from array1 is concatenated with the last element in array2 etc.<P> I hope this makes sense but here's an example to demonstrate.
<code>
my @array1 = ('lots', 'of', 'nice', 'words');
my @array2 = ('red','clothes', 'are', 'fun');
# therefore my new array looks like this;
lotsfun ofare niceclothes wordsred
</code>
I hope someone can help - my arrays are pretty huge so i guess a loop is needed.
Cheers!
7