in reply to Re: Combining Duplicate entries in an Array
in thread Combining Duplicate entries in an Array
Does the same thing just a little more long winded and simpler for a noob..for (my $x = $#temp; $x >= 0; $x--) { if ( substr($temp[$x-1][0], 0, -1) eq substr($temp[$x][0], 0, -1)) { $temp[$x-1][1] += $temp[$x][1]; splice @temp, $x, 1; } }
|
|---|