for($i=$ARGV[0];$i<$ARGV[1];$i++){ # args split for readability my $cmd="/OpenDeployNG/bin/iwodcmd start wft_filelist_test -inst $i -k area=<my-area> -k filelist=<my-filelist>"; print "$cmd\n"; #cmd($cmd); sleep 1;}# run the backend process to update the source > targetsub cmd{ my($cmd)=@_; $SIG{INT} = 'IGNORE'; # c 'turn undead' zombies unless(fork) { open STDIN, "</dev/null"; open STDOUT, ">/dev/null"; exec("$cmd"); exit; # This block only executes if we're the child, so exit when we're done. }}