Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks,
look below data:I'd like to extract all data in M and D(including M & D), and group them respectively likemy @dd = qw/AA JJ CC M 1 1 3 4 D JJ 1 1 D M 3 3 4 D C M 3 3 3 D P Z/;
before I manually(ugly)treat them by a loop or recursion, I'd like to ask monks if any module treat this problem.my @res1 = qw/M 1 1 3 4 D/; my @res2 = qw/M 3 3 4 D/; my @res3 = qw/M 3 3 3 D/;
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how extract and group data in a array
by kcott (Archbishop) on Feb 21, 2017 at 06:10 UTC | |
by Athanasius (Archbishop) on Feb 21, 2017 at 07:45 UTC | |
by Anonymous Monk on Feb 21, 2017 at 07:18 UTC | |
by kcott (Archbishop) on Feb 21, 2017 at 21:30 UTC | |
|
Re: how extract and group data in a array
by choroba (Cardinal) on Feb 21, 2017 at 06:23 UTC | |
|
Re: how extract and group data in a array
by tybalt89 (Monsignor) on Feb 21, 2017 at 10:05 UTC | |
|
Re: how extract and group data in a array
by GrandFather (Saint) on Feb 21, 2017 at 06:08 UTC | |
|
Re: how extract and group data in a array
by johngg (Canon) on Feb 21, 2017 at 23:03 UTC |