unless(fork){ print "Child Process created\n"; exit 0; } foreach $i (1..3) { print "Parent Process Created\n"; }