#!/usr/bin/perl my $pid = fork; if ($pid == 0) { # Child process print "Inside child process\n"; exit 1; } elsif ( $pid > 0 ) { # Parent process print "Inside parent process\n"; } else { # fork error print "ERROR! PID : $pid \n"; exit 1; }