in reply to Filling An Array

@a = grep { (/.(..)/)[0] < 13 } 'A01'..'H12';

Replies are listed 'Best First'.
Re: Re: Filling An Array
by Roy Johnson (Monsignor) on Apr 21, 2004 at 21:20 UTC
    Incorrect. Includes B00, for example. (Besides, my map is still golfier. :-))

    The PerlMonk tr/// Advocate
      Ack!
      @a = grep $_++, grep { (/.(..)/)[0] < 12 } 'A00'..'H11';
        You may be onto something for an obfu entry. For a little clearer use of grep, how about:
        @a = grep /[A-H](0[1-9]|1[0-2])/, 'A01'..'H12';
        ?

        The PerlMonk tr/// Advocate