Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Recursively changing STDOUT

by moritz (Cardinal)
on Sep 16, 2007 at 12:22 UTC ( [id://639245]=note: print w/replies, xml ) Need Help??


in reply to Recursively changing STDOUT

You can use lexical variables as file handles:

open (my $saveout, ...);

Replies are listed 'Best First'.
Re^2: Recursively changing STDOUT
by casiano (Pilgrim) on Sep 16, 2007 at 12:32 UTC
    Thanks Moritz,

    But to recover the old values I have now:

    open(STDOUT, ">&SAVEOUT"); open(STDERR, ">&SAVEERR");

    ¿Can I use this with lexical variables? i.e.

    open(STDOUT, ">&$SAVEOUT"); open(STDERR, ">&$SAVEERR");

    It will not produce a interpolation of the filehandle?

    Casiano

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-29 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found