You could also use glob:
my @set = glob "{A,B,C,D}{P,Q,R}{1,2,3,4,5}";
print "@set\n";
___
$ ./700577.pl
AP1 AP2 AP3 AP4 AP5 AQ1 AQ2 AQ3 AQ4 AQ5 AR1 AR2 AR3 AR4 AR5 BP1 BP2 BP
+3
BP4 BP5 BQ1 BQ2 BQ3 BQ4 BQ5 BR1 BR2 BR3 BR4 BR5 CP1 CP2 CP3 CP4 CP5 CQ
+1
CQ2 CQ3 CQ4 CQ5 CR1 CR2 CR3 CR4 CR5 DP1 DP2 DP3 DP4 DP5 DQ1 DQ2 DQ3 DQ
+4
DQ5 DR1 DR2 DR3 DR4 DR5
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.