sub calculate_time { ($begin_Day,$begin_Month,$begin_Year,$begin_Hour,$begin_Minute,$beg +in_Second)= $begin_time =~m#^(\d\d)/(\w\w\w)/(\d\d\d\d):(\d\d):(\d\d) +:(\d\d)#; ($end_Day,$end_Month,$end_Year,$end_Hour,$end_Minute,$end_Second)= $da +teproc =~m#^(\d\d)/(\w\w\w)/(\d\d\d\d):(\d\d):(\d\d):(\d\d)#; &Initialize; my $begin_seconds = timelocal($begin_Second, $begin_Minute, $begin_ +Hour, $begin_Day, $MonthToNumber{$begin_Month}, $begin_Year-1900); my $end_seconds = timelocal($end_Second, $end_Minute, $end_Hour, $e +nd_Day, $MonthToNumber{$end_Month}, $end_Year-1900); my $elapsed = $end_seconds - $begin_seconds; if ( $elapsed < $interval ){ push (my @visual_page_values, {$processed_visual_pages{$dateproc +}}); print "The End seconds are: $dateproc @{$processed_visual_pages{$d +ateproc}}\n"; }else { $begin_time = $dateproc; push (@final_visual_pages, $dateproc); print " Final Visual pages are: @final_visual_pages\n"; } } sub Initialize { my %MonthToNumber=( 'Jan', '01', 'Feb', '02', 'Mar', '03', 'Apr', '04', 'May', '05', 'Jun', '06', 'Jul', '07', 'Aug', '08', 'Sep', '09', 'Oct', '10', 'Nov', '11', 'Dec', '12', ); my %NumberToMonth=( '01', 'Jan', '02', 'Feb', '03', 'Mar', '04', 'Apr', '05', 'May', '06', 'Jun', '07', 'Jul', '08', 'Aug', '09', 'Sep', '10', 'Oct', '11', 'Nov', '12', 'Dec', ); }
In reply to Re: Re: Parsing of the web log file, access_log
by Andy61
in thread Parsing of the web log file, access_log
by Andy61
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |