in reply to Re: brutally stop a perl program if it runs too long
in thread brutally stop a perl program if it runs too long

Cool idea, but I don't think it works as is (at least not for me) because the import routine is called after the module is required, so the forking block would never see the correct value of $N. The solution is simply to make it all part of the import subroutine, and use return instead of last.