As long as you are not blindly interpolating into a string
eval (e.g.
eval ".../$re/...", you can just set an
alarm to guard against maliciously time-consumptive regex's and you should be ok.
Abigail's is nice, but I prefer $matchtext =~ /^(?!.*foo)/