in reply to Most recent pattern match

Using $& will slow down every regexp in your programs that doesn't capture. The minimal fix is:
if ($string =~ /($regexp)/) { if ($1 eq "insert" or $1 eq "delete" or $1 eq "update") { do something with $string } call a subroutine here... }