my $pid = fork(); if (not defined $pid) { warn "resources not avilable.\n"; } elsif ($pid == 0) { print "Child: My PID is $$\n"; exit(0); } print "Parent: I talk to child by adding to QUEUE associated with $pid\n";