$command = "program_to_run $opt{c} -f test"; # print "$command\n"; open(RUN, "$command 2>&1|"); while () { print "$_\n"; next; } close(RUN); exit 0;