if ($line =~ /^(?:(?!throw).)*$/s) { debug ("Doesn't contain throw"); }