http://qs321.pair.com?node_id=733569


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