Don't know if anyone can help me with this. :0
Question:
I have an array that looks like this.
my @cart_data = (
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'1619|8173|1|6.99|0.00|0|0|9',
'1619|8173|1|6.99|0.00|0|0|9',
'1619|8173|1|6.99|0.00|0|0|9',
'2364|1410B|1|1.49|0.00|0|0|5',
);
What I am looking to do is get the total of each unique group
Example Result:
Group 11 has 19
Group 9 has 3
Group 5 has 1
-----
Thanks in advance
Question:
I have an array that looks like this.
my @cart_data = (
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'298|3042|1|7.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'299|3045|1|14.99|0.00|0|0|11',
'1619|8173|1|6.99|0.00|0|0|9',
'1619|8173|1|6.99|0.00|0|0|9',
'1619|8173|1|6.99|0.00|0|0|9',
'2364|1410B|1|1.49|0.00|0|0|5',
);
What I am looking to do is get the total of each unique group
Example Result:
Group 11 has 19
Group 9 has 3
Group 5 has 1
-----
Thanks in advance