--- Roland Schoenbaechler <[EMAIL PROTECTED]> wrote:
> In a sub of my script I redirected STDERR in a file. How can I
> redirect the STDERR back to the default (screen) for the following
> subs?
Use local(). It's not something to make a big habit of, but this is a
good place for it.
sub func {
local *STDERR;
open STDERR, ">$file" or die $!;
# code here
} # STDERR gets "fixed" when the local() scope ends here
c.f. perldoc -f local
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]