Alternation?
#!/usr/bin/perl -w use strict; my @bad = (); my ($f, $fh, $baddies, $sql, $badregex) = ('./badactors.txt',undef, un +def, '', undef); open($fh, '<', $f) or die $!; while(<$fh>){ chomp; next if m/^$/; push @bad, $_; } close($f); $baddies = join qq{\|},@bad; $badregex = qr~$baddies~; # easy test my $junk = 'doodle bot'; if ($junk=~m/$badregex/) { print qq~\nSee....?\n~; } 1; __DATA__ $dbh->do("INSERT INTO Site_Visit SET firstVisit = NOW(), lastPage = ?, + firstPage = ?, IP = ?, userAgent = ?, orsa = ?, orta = ?, Person_idP +erson = ?", undef, $ENV{'REQUEST_URI'}, $ENV{'REQUEST_URI'}, $ENV{'REMOTE_ADDR'}, $E +NV{'HTTP_USER_AGENT'}, $cookie{'orsa'}, $data{'orta'}, $user) unless $ENV{'HTTP_USER_AGENT'} =~ /bot/i or $ENV{'HTTP_USER_AGENT' +} =~ /facebook/i or $ENV{'HTTP_USER_AGENT'} =~ /dataprovider/i; <code>
Celebrate Intellectual Diversity
In reply to Re: Bot vs human User Agent strings
by InfiniteSilence
in thread Bot vs human User Agent strings
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |