Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Redirecting STDOUT from internal function with 5.6.1 restrictions

by Jenda (Abbot)
on Oct 12, 2004 at 19:30 UTC ( #398663=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Redirecting STDOUT from internal function with 5.6.1 restrictions
in thread Redirecting STDOUT from internal function with 5.6.1 restrictions

OK then. I should have tested my suggestions. Anyway this does seem to work fine in Perl 5.6.1:

use FileHandle; use Test; plan(tests => 3); ok("first"); { local $Test::TESTOUT; open $Test::TESTOUT, '>', "$ENV{TEMP}/zkTestRedirect.txt"; ok("second"); } ok("third");

Jenda
We'd like to help you learn to help yourself
Look around you, all you see are sympathetic eyes
Stroll around the grounds until you feel at home
   -- P. Simon in Mrs. Robinson


Comment on Re^3: Redirecting STDOUT from internal function with 5.6.1 restrictions
Download Code
Replies are listed 'Best First'.
Re^4: Redirecting STDOUT from internal function with 5.6.1 restrictions
by mgc (Novice) on Oct 12, 2004 at 20:43 UTC
    Thanks for the input. It seems thought, your example is still writing to a file. I am trying to trap STDOUT and redirect to a variable(memory).

    mgc

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://398663]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2015-07-29 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls