#! perl -slw use strict; if( @ARGV ) { print 'I am the child. I got args: ', join', ', @ARGV; sleep 10; print 'Child ended'; } else { print 'I am the parent'; for ( 1 .. 3 ) { print "Starting child $_"; system 1, $0, 'An arg', $_; } print 'Parent continuing'; sleep 10; print 'parent exiting'; } __END__ c:\test>junk I am the parent Starting child 1 Starting child 2 Starting child 3 Parent continuing I am the child. I got args: An arg, 2 I am the child. I got args: An arg, 3 I am the child. I got args: An arg, 1 parent exiting c:\test>Child ended Child ended Child ended