in reply to chdir in CGIs, taint mode and mod_perl
Run the uncooperative command in it's own shell and change directory in that child shell.
system( qq{ cd $output_dir ; exec uncooperative $some_arg $other_arg } + ); [download]