$pid = open(KID_TO_READ, "-|"); die "Unable to fork: $!\n" unless defined $pid; if (!$pid) { # child exec($program, @options, @args) or die "Can't exec $program: $!\n"; }