On 10/17/07, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> From: "Chas. Owens" <[EMAIL PROTECTED]>
> > which can be implemented like this
> >
> > my @weekdays = join '|', qw<Sunday Monday ... Saturday>;
> > my @months = join '|', qw<January February ... December>;
> >
> > /Start date (?:@weekdays), ((?:@months) \d{2} \d{4})/;
>
> I think you mean $weekdays and $months :-)
> It works with the @ as well, but it's misleading. There is only one
> item in both @weekdays and @months in your code.
>
> I bet you just forgot to change the sigil after some changes in the
> code :-)
snip

Yeah, I was originally going to have arrays that I joined to make
scalars that I was going to put into the regex, but I got lazy 'cause
I'm sick (I was also going to list all of the days and months, but
again, too tired).  Scarily enough, it still works (they are arrays
with only one element so the join with $" has no effect during
interpolation), but its incredibly sloppy.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to