in reply to How to capture process and redirect STDOUT in a hash
Could you maybe redirect the output to a pipe?