{ my @prog = ('/path/to/program', @opts, @args); my $pid = fork(); defined $pid or warn "Could not launch @prog" and last; last if $pid; # Parent # adjust child environment here, if desired exec @prog; }