kfriman has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I've a 2D array that I would like to edit, so that the elements are grouped based on the first and second columns. The first column contains the quantity and the last one contains the price. Both quantity and price should be summarized on the grouped elements.
Before editing:
1 PC BOX 20,0 1 PC Spare 32,0 1 PC Spare 5,2 1 PE Ak 100,0
After editing:
1 PC BOX 20,0 2 PC Spare 37,2 1 PE Ak 100,0
Br, klaus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Grouping of 2D arrays
by shmem (Chancellor) on Apr 20, 2017 at 12:35 UTC | |
|
Re: Grouping of 2D arrays
by LanX (Saint) on Apr 20, 2017 at 11:40 UTC | |
by AnomalousMonk (Archbishop) on Apr 20, 2017 at 15:06 UTC | |
by LanX (Saint) on Apr 20, 2017 at 15:17 UTC | |
by AnomalousMonk (Archbishop) on Apr 20, 2017 at 15:24 UTC | |
by LanX (Saint) on Apr 20, 2017 at 15:35 UTC | |
| |
|
Re: Grouping of 2D arrays
by kroach (Pilgrim) on Apr 20, 2017 at 09:41 UTC | |
by kfriman (Initiate) on Apr 24, 2017 at 07:17 UTC | |
by Anonymous Monk on Apr 20, 2017 at 17:08 UTC | |
|
Re: Grouping of 2D arrays
by thanos1983 (Parson) on Apr 20, 2017 at 17:14 UTC |