Hi,
Comment me if there is any mistake of mine please?
Even the @weekdays doen't yield all the days instead it yields the combination of three days...
Thanks yar........
Boniface

-----------------------------
#!/usr/bin/perl
open DAT,"<html.txt" || die ("Could not open file!\n");
foreach $line (<DAT>)
{
#print $line,"\n";

my @weekdays = join '|', qw<Sunday Monday...Saturday>;
my @months = join '|', qw<January February ... December>;
print @weekdays;
$date =~m/Start date (?:@weekdays), ((?:@months) \d{2} \d{4})/is;

print $date;
}
close DAT;












On Wed, 17 Oct 2007 10:36:00 -0400
 "Chas. Owens" <[EMAIL PROTECTED]> wrote:
*This message was transferred with a trial version of CommuniGate(r) Pro*
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/


<td align="right" class="textfield" colspan="2">
                   <span class="sequence-star">
<span class="titolo-hotel">
1  per 1 guest
<br/>
<br/>
Start date Monday, March 12 2007
<br/>
End date Tuesday, March 13 2007
<br>
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/

Reply via email to