# @exec has the commad that i wish to run use IPC::Open3 my $pid; $pid = open (WTR,T_RES,ERR,"@exec") or die "Unable to fork '@exec': $!"; while () { # parsing the output } waitpid $pid, 0; # if necessary, see below