in reply to Re: process redirection
in thread process redirection

...putting that into code and showing how to redirect the other output as well:-
system( "cd $mydir; $command > cmd.log 2>\&1" );

One world, one people