On Wednesday, May 22, 2002, at 03:26 , Sven Bentlage wrote:
> ok, found out myself why it didn't work.
> I am not sure if it's an elegant chunk of code, but it works.
> Since the data is in the $_ variable, fooling around with $date_today in
> the regex coulnd't work out.
> (Omitted =~ since I use $_.)
may I recommend what may be simpler?
# never argue with what works. PERIOD.
my @t=localtime;$t[4]++;$t[5]+=1900;
# for the DD-MM-YYYY we would use
my $dtg = sprintf("%02d-%02d-%4d",@t[3,4,5]);
....
my @notFound;
while(<FH>) {
if (/$dtg/ ) {
print $_; #or what ever you
} else {
push(@notFound, $_);
}
}
close(FH);
print "#----------\n# ok, so what did we put in the \@notFound\n\n";
print $_ for @notFound;
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]