|XP is just a number|
Redirecting STDOUT from internal function with 5.6.1 restrictionsby mgc (Novice)
|on Oct 12, 2004 at 16:53 UTC||Need Help??|
mgc has asked for the
wisdom of the Perl Monks concerning the following question:
I have combed the archives of this site looking for help with redirecting STDOUT from the Test::ok function temporarily. Unfortunately, all the answers so far work fine in 5.8 but not on 5.6 or require adding a new file to application distribution.
My first attempt was as follows:
Unfortunately, the manpage for open in 5.6 does not allow the use of references in the same way as 5.8. It creates a file by the name 'HASH(0x3859383)' or the like.p>Using Tie::Handle requires creating another file which on our system requires going through the whole design process again. The preferred solution is a modification to the file this code resides in.
The only option I came up with, which is a hack, is to write/read a temp file...yuck...
Any other ideas?