sub fork_test { my ($file,$logfile)= @_; print "I'm working on file '$file', logfile '$logfile'.\n"; sleep 3; print "I'm done working.\n"; } #### while ( $count > $max ) { wait; $count--; } #### die "Can't fork: $!\n" unless defined(my $pid = fork());
## while ( $count > $max ) { wait; $count--; } ##
## die "Can't fork: $!\n" unless defined(my $pid = fork());