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