in reply to Re: Re: Filling An Array
in thread Filling An Array

Ack!
@a = grep $_++, grep { (/.(..)/)[0] < 12 } 'A00'..'H11';

Replies are listed 'Best First'.
Re: Re: Re: Re: Filling An Array
by Roy Johnson (Monsignor) on Apr 21, 2004 at 21:42 UTC
    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
      @a = grep /[A-H](0[1-9]|1[0-2])/, 'A01'..'H12';

      Why [A-H]?

      Gain 5 strokes:

      @a = grep /(0[1-9]|1[0-2])/, 'A01'..'H12';

      dave