#!/usr/bin/perl $pid = fork(); if( $pid == 0 ){ print "This is child process\n"; print "Chile process is existing\n"; exit 0; } print "This is parent process and child ID is $pid\n"; print "Parent process is existing\n"; exit 0; #This will produce following result This is parent process and child ID is 16417 Parent process is existing This is child process Chile process is existing #### This is child process Chile process is existing This is parent process and child ID is 16417 Parent process is existing