#!/bin/perl use strict; use warnings; my $prog = 'some_executable'; defined( my $pid = fork ) or die "Cannot fork: $!"; print "pid:$pid\n"; unless( $pid ) { exec "$prog"; die "cannot exec date: $!"; }