#!/usr/local/bin/perl -w use strict; my $parentpid = $$; my $kidpid; print "This is the original process the pid = $$\n"; if (!defined ($kidpid = fork())) { #fork failed. print "Can't fork: $!"; } elsif ($kidpid ==0) { print "\tThis is the child process.. parentpid = $parentpid\n"; print "\tThis is the child process its pid = $$\n"; } else { sleep(1); print "This is the return to the parent process\n"; }