in reply to Catching STDERR with open (

Read this, this, this, this, and this.

Remember, super search is your friend. If you don't find your answer in those nodes, please reply to this post.