for (1..3) { my $fork_pid = fork(); if (! $fork_pid) { print "hello" . "\t"; # my $processes = `ps au`; print "world" . "\n"; exit 0; } }