#!/usr/bin/perl use strict; use warnings; my $pid = fork; if ((defined $pid) && ($pid == 0)) { exec("sleep 30 >> /dev/null 2>&1 &"); exit; } print "child pid [$pid]\n";