My ref-filter script

#/usr/bin/perl

my $s;
while ($s = <>)
  {
    if ($s =~ /.+?\"GET ([^ ]+) .+?".+?"([^"]+)/)
      {
        my $REF = $2;
        my $PAGE = $1;
        if ($REF ne "-"
            && $REF !~ /sacha.free.net.ph/
            && $REF !~ /richip.dhs.org/
           && $REF !~ '\+') {
          print "$REF\n";
        }
      }
  }

Invocation:

cat log | perl ref.pl | sort | uniq > reff

For greater fun and profit, diff against previous records.

../../sitelogs/ref.pl