Help for this page

Select Code to Download


  1. or download this
    foreach (@count) {
        if ($_->[0] eq $bn) {
    ...
    if ($found == 0) {
        push @count, [ $bn, 1 ];
    }
    
  2. or download this
    ++$count{$bn};
    
  3. 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
    
  4. or download this
    if (/$regex/) {
        s/.*GET //;
        s/ HTTP.*//;
          :
          :
    
  5. or download this
    if (s/$regex/$1/) {
          :
          :
    
  6. or download this
    use strict;
    use File::Basename;
    ...
    foreach (sort keys %count) {
            print $_," = ",$count{$_},"\n";
    }