![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Writing to a file handle not attached to a file?by Anonymous Monk |
on Oct 26, 2006 at 08:16 UTC ( #580704=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm dealing with an API that takes a file hanlde to write output to as an argument. The problem is, I need the output right after, and I'd rather not go through the trouble of creating a file just to have to read from it and then delete it afterwards. Is there anyway to redirect a file handle to a scalar, so that when it's written to (e.g., "print $handle $ouptut"), the output ends up in a scalar?
Back to
Seekers of Perl Wisdom
|
|