Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
And yes, the values in column 3 aren't fixed one. They can be any number, and I want to group arrays based on its value.@arr = ([12, "abc", 30], [24, "abc", 30], [26, "abc", 30], [14, "abc", 40], [46, "abc", 40], [2, "abc", 50]); #I want to slice them based on column 3, such that @arr1 = ([12, "abc", 30], [24, "abc", 30], [26, "abc", 30]); @arr2 = ([14, "abc", 40], [46, "abc", 40]); @arr3 = ([2, "abc", 50]);
|
|---|