I have a text file containing contents like
1 A 0 -1 -2 -3 -4
2 A -1 2 3 -4 -5
So I read the file and used split function as @a=split(/ /,$_) and took each line into array a.
But now when I take these into array a they are like 1A0-1-2-3-4 and 2A-123-4-5.
I need to add 1st line and 2nd line ie (0+-1, -1+2, -2+3, -3+-4, -4+-5).
Tried separating array elements with comma. If that is done adding is easy. But am finding difficult.
Can u help in first separting elements with comma.
Thanx in advance