system("ls -l > ls.out"); # you gonna have to wait system("ls -l > ls.out &"); # the command goes into the # background #### my $pid = fork; die "Fork failed me!\n" if !defined($pid); if ( $pid == 0 ) { # I'm the child! exec("ls -l > ls.out"); } # I'm the parent! sleep 5; #or whatever