well I didn't know that it was also dangerous with the regexp engine. I'll be more cautious. Anyways Thanks to everybody, and if somebody that has the same problem reads this: one solution (without rewriting your script with a better logic) would be to ignore signals in subs containning dangerous code .