Adding two arrays (element by element)

From: Björn (b972_at_telia.com)
Date: 03/18/04


Date: Thu, 18 Mar 2004 19:33:39 GMT

Hello,

Starting to code a robust routine to add two arrays
element by element $new[0] = $a[0] + $b[0] ...
I thought that this should already be done
and searched CPAN for a sutiable module.
Despite Math:::Matrix I could not realy find much
and the ::Matrix module seemed to be more that
I needed...

The resulting array should have the length of the longest
and be robust to differences in length.

Is there a "best practice" solution to this?

/Björn