in reply to Fork horror

For fork()ing a specified number of children see Abigail-II's Many children, but never more than a fixed number at once. and gav^'s note about Parallel::ForkManager.

As far as your code goes I believe you want to use system() instead of exec(). I'd also highly recommend using one of the Getopt modules over rolling your own command-line argument parser.
HTH

_________
broquaint