Thanks for replying.
What i want to do is read each line of the file and get the name and the amount. then read the next line and if the name exists, add the amount.
i could write a very long winded loop to get the unique name elements then for each of them add the amount per line but i am sure there is a better way to do this.
In reply to Re^2: adding values of element
by new2perl2
in thread adding values of element
by new2perl2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |