in reply to redirecting function output

use IO::Scalar.

use IO::Scalar; tie *STDOUT, 'IO::Scalar', \my $out; function_which_prints_to_stdout(); untie *STDOUT; # the output is stored in $out

--
Tatsuhiko Miyagawa
miyagawa@cpan.org