- or download this
foreach (@count) {
if ($_->[0] eq $bn) {
...
if ($found == 0) {
push @count, [ $bn, 1 ];
}
- or download this
++$count{$bn};
- or download this
my $regex = join '|', @mask;
# Now you have a list of alternatives
$regex = qr<GET (.*\b(?:$regex)\b.*) HTTP/1.1" 200 [0-9].*>;
# now the regex is precompiled
- or download this
if (/$regex/) {
s/.*GET //;
s/ HTTP.*//;
:
:
- or download this
if (s/$regex/$1/) {
:
:
- or download this
use strict;
use File::Basename;
...
foreach (sort keys %count) {
print $_," = ",$count{$_},"\n";
}