How do I capture Perl's STDOUT in a variable?

Viewed 8829

I am calling a function that writes to STDOUT using print. How can I capture this in a variable?

Note that all this happens within the same process.

2 Answers
Related