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?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Writing to a file handle not attached to a file?
by gellyfish (Monsignor) on Oct 26, 2006 at 08:22 UTC | |
Re: Writing to a file handle not attached to a file?
by GrandFather (Saint) on Oct 26, 2006 at 08:28 UTC | |
Re: Writing to a file handle not attached to a file?
by jdporter (Paladin) on Oct 26, 2006 at 14:31 UTC |
Back to
Seekers of Perl Wisdom