my $child_pid = fork(); if ( $child_pid ) { # parent goes about its business } elsif ( defined $child_pid ) { # child my $pid = open(PID, "|$cmd") or die "Can't fork: $!"; # blah blah # this hangs until process_tar.pl finishes. close(PID) or die "Can't close: $!"; exit; } else { die "Can't fork: $!"; }