You might need different quoting on -F depending on your shell. Add option -MO=Deparse to see the longer code$ perl -F'\|' -nale '$x[$F[0]-1]+=$F[1]}{print"the total is: ($_)"for@ +x' input.txt the total is: (150) the total is: (75) the total is: (55)
In reply to Re: array of arrays
by Anonymous Monk
in thread array of arrays
by virtualweb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |