I have two arrays:
@arr1 = ( 1, 0, 0, 0, 1 ); @arr2 = ( 1, 1, 0, 1, 1 );
I want to sum items of both arrays to get new one like
<
If you're really afraid of looping, then you can binary chop the arrays, sum the pairs, then recursively reassemble the resulting array. No looping there, and as a bonus you get to learn how part of the fast-fourier transform derivation works.