use IO::Scalar; $tied_stdout = tie *STDOUT, 'IO::Scalar'; print 'this was printed into $tied_stdout'; print STDERR "And to prove it: ", $tied_stdout, "\n";
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Redirect STDOUT to Scalar W/o Filehandle?
by sauoq
in thread Redirect STDOUT to Scalar W/o Filehandle?
by chunlou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |