in reply to fork n wait

Take a look at Run commands in parallel for working code for a similar task. Also note that avoiding signal handlers is probably a Good Idea in Perl.