while ($line = <FIL>)
{
chop $line;
# 1/14/04 12:32 AM 124 <A HREF="/data/123072.txt">123072.txt</A><br> Mehul's Format
# Thursday, November 13, 2008 11:00 PM 496 165455.txt First OMAC news format
# 13 November 2008 14:52 124 165446.txt OMAC's new Format
if($line =~ /[\w ]+,\s(\w+)\s(\d{1,2}),\s+(\d{4})\s+(\d{1,2})

\d{1,2})\s+(\w{1,2})\s+(\d+) </)
{
#print "MATCH: \n";
my %fix_month = ('jan', '1', 'feb', '2', 'mar', '3', 'apr', '4',
'may', '5', 'jun', '6', 'jul', '7', 'aug', '8', 'sep', '9',
'oct', '10', 'nov', '11', 'dec', '12');
if($6 eq 'PM' && $4 < 12) {
$mil_hour = $4 + 12; # i.e. 12:55 PM = 12:55 while 11:55 PM = 23:55
} elsif($6 eq 'AM' && $4 == 12) {
$mil_hour = $4 - 12; # i.e. 12:55 AM = 00:55
} else {
$mil_hour = $4;
}
$date_stamp = sprintf("%02d%02d%02d%02d%02d",$3,$2,$fix_month{lc(substr($1,0,3))},$mil_hour,$5); # YYYYMMDDhhmm
$day_stamp = sprintf("%02d%02d%02d", $3,$fix_month{lc(substr($1,0,3))},$2); # YYYYMMDD
$filesize = $7;
}
Yes I know I will have to fix variables, but that I can handle
