It doesn't follow the syntax example you have, but maybe Test::Output could do what you want.
In reply to Re: Testing a module's stdout/stderr
by kyle
in thread Testing a module's stdout/stderr
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |