in reply to Re: Incrementing strings revisited: What do i miss?
in thread Incrementing strings revisited: What do i miss? [SOLVED]

"...thinking...in terms...letters being the equivalent of digits in a number..."

Yes. Base 20 in this case.

"...BBB comes after ZZ..."

So the sequence should be like this...

my @seq_01 = qw (B C D F G H J K L M N P Q R S T V X Y Z); my @seq_02 = qw (BB CC DD FF GG HH JJ KK LL MM NN PP QQ RR SS TT VV XX YY ZZ); my @seq_03 = qw (BBB CCC DDD FFF GGG HHH JJJ KKK LLL MMM NNN PPP QQQ RRR SSS TTT +VVV XXX YYY ZZZ); my @merged_seq = (@seq_01, @seq_02, @seq_03);

D'oh! I didn't recognize the pattern.

Thank you very much for advice and breaking my mental block.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^3: Incrementing strings revisited: What do i miss?
by Anonymous Monk on Feb 13, 2015 at 20:48 UTC

    Maybe I'm not understanding your @merged_seq, but do you mean to say CC will come directly after BB? I don't think that's the intent, BB would still be followed by BC, BD, etc., so in that respect the sequence is still like a counter. The point here is that at ZZ the sequence would roll over to BBB and not CBB, followed by BBC, BBD, etc.

      "...May be I'm not understanding your @merged_seq..."

      No, you don't and it seems like i failed. No, you don't misunderstand my construct but it seems like i failed. I should have dumped it before posting:

      Edit: Added some clarification

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»