$pid = fork(); if (! $pid) { ### This is the new process for ($j=10;$j>=0;$j--) { print "$j\n" }; } else { ### This is the parent process for ($i=1;$i<=10;$i++) { print "$i\n" }; }