|
| that's the whole code
apache;s log is being parsed
open LOG_FILE, "</access_log";
while(<LOG_FILE> ) {
$_=~s/Jan/1/ig;
$_=~s/Feb/2/ig;
$_=~s/Mar/3/ig;
$_=~s/Apr/4/ig;
$_=~s/May/5/ig;
$_=~s/Jun/6/ig;
$_=~s/Jul/7/ig;
$_=~s/Aug/8/ig;
$_=~s/Sep/9/ig;
$_=~s/Oct/10/ig;
$_=~s/Nov/11/ig;
$_=~s/Dec/12/ig;
@fields=split(/ /, $_);
$datetime=substr($fields[3],1);
@fields=split(/[\/:]/, $datetime);
my $cur_datetime=DateTime->new(year=>$fields[2],
month=>$fields[1], day=>$fields[0], hour=>$fields[3],
minute=>$fields[4], second=>$fields[5]);
}
From: Marcello <m.romani@spinsoft.it>
To: beginners@perl.org
Date: Thursday, October 6, 2005, 4:23:24 PM
Subject: datetime odd problem
Thursday, October 6, 2005, 4:23:24 PM, you wrote:
> John ha scritto:
[color=darkred]
> I think you should show us where those $fields come from.
> --
> Marcello Romani
> Developer
> Spin s.r.l.
> Reggio Emilia
> http://www.spinsoft.it
|
|