in reply to Redirect STDOUT to Scalar W/o Filehandle?
In perl 5.8, open a referefence to the string in the filename slot:
my $string; { open local(STDOUT), '>', \$string; $obj->print; } [download]
After Compline,Zaxo