http://qs1969.pair.com?node_id=580704

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm dealing with an API that takes a file hanlde to write output to as an argument. The problem is, I need the output right after, and I'd rather not go through the trouble of creating a file just to have to read from it and then delete it afterwards. Is there anyway to redirect a file handle to a scalar, so that when it's written to (e.g., "print $handle $ouptut"), the output ends up in a scalar?