Searching for STDOUT on CPAN yields several implementations of a tied STDOUT which allows you to capture/redirect output:
In reply to Re: How to redirect STDOUT to an array (not executing program)
by Corion
in thread How to redirect STDOUT to an array (not executing program)
by rapide
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |