Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Parsing Apache logs with Regex

by borisz (Canon)
on Dec 31, 2008 at 22:16 UTC ( #733569=note: print w/ replies, xml ) Need Help??


in reply to Parsing Apache logs with Regex

I inherit from Regexp::Log or Regexp::Log::Common.

my $foo = Regexp::Log::Common->new( format => ':common', capture => [qw( date req bytes )], ); my @fields = $foo->capture; my $re = $foo->regexp; while (<>) { my %data; @data{@fields} = /$re/; ... }
Boris


Comment on Re: Parsing Apache logs with Regex
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://733569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-08-23 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (175 votes), past polls