sub fork_test { my ($file,$logfile)= @_; print "I'm working on file '$file', logfile '$logfile'.\n"; sleep 3; print "I'm done working.\n"; }