use threads; $thread = $threads->new(\&dostuff, "options_here"); $thread->detach; sub dostuff { $return = `foo.exe -$_[0]`; print $return; do_logging_stuff($return); }