J
John
HI,
I have this.
@arr = qw(ab a b ab ba ba ab ba);
and I would like to classify the index with the values:
@output = ([0, 3, 6],
[1],
[2],
[4, 5, 7]
);
or in hash
%output = (
0 => [0, 3, 6],
1 => [1],
2 => [2],
4 => [4, 5, 7]
);
on this situation I don't know which approach is the best the array
one or the hash, in order to classify then and also in performance.
What will be you approach?
Thanks for your help
J
I have this.
@arr = qw(ab a b ab ba ba ab ba);
and I would like to classify the index with the values:
@output = ([0, 3, 6],
[1],
[2],
[4, 5, 7]
);
or in hash
%output = (
0 => [0, 3, 6],
1 => [1],
2 => [2],
4 => [4, 5, 7]
);
on this situation I don't know which approach is the best the array
one or the hash, in order to classify then and also in performance.
What will be you approach?
Thanks for your help
J