Hello,

I am using the following to redirect STDERR and STDOUT:

open(STDOUT, "> $logfile") || die "Can't redirect stdout";
open(STDERR, ">&STDOUT") || die "Can't dup stdout";

select(STDERR); $| = 1;     # make unbuffered
select(STDOUT); $| = 1;     # make unbuffered

......
........

close(STDOUT);
close(STDERR);


This seems to work except if I do a:

print "Done\n"; after I close both STDOUT and STDERR I do not see it on
the screen ?? it also is NOT in the logfile ??

So where did it go ? am I properly redirecting STDIN and STDOUT ?

Michael




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to