my $pid = fork // die "fork: $!"; unless ($pid) { ... child stuff ... exit; } ... parent stuff ... wait;