use Proc::Background; my $proc = Proc::Background->new( $cmd ); $proc->wait; # wait for completion