use IPC::Run qw(run); my($out, $err); run ['/path/to/prog', 'arg1', 'arg2'], '>', \$out, '2>', \$err;