(Perl) run a subprocess with input/ouput redirection