in reply to adding array elements

Read perlintro, read from data, split, iterate, add ... actually, you know what, considering your first question, subtraction in array, how about you ask that guy?