open(SAVESTDOUT, ">&STDOUT") or die "Can't save STDOUT: $!\n";
open(STDOUT, ">$logfile") or die "Can't open STDOUT to $logfile",
"$!\n";
....
open(STDOUT, ">&SAVESTDOUT");   # Close log file and restore STDOUT




-----Original Message-----
From: Teifke Sascha ZFF FW-EI [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 02, 2002 9:58 AM
To: '[EMAIL PROTECTED]'
Subject: redirect STDOUT and restore STDOUT


Hello List,

how can I redirect STDOUT to a file and restore it when done?

Mit freundlichen Gr��en / With best regards

Sascha Teifke
**********************************************************
ZF Friedrichshafen AG | 88038 Friedrichshafen | Abt. FW-EI

Fon:    +49 (0) 7541 77 - 3330
Mobil:  +49 (0) 7541 77 - 91 3330
Fax:    +49 (0) 7541 77 - 90 3330
Email:  mailto:[EMAIL PROTECTED]
Internet:       http://www.zf.com
Intranet:       http://web.zff.zf-group.de/kst635
**********************************************************

_______________________________________________
Perl-Win32-Admin mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to