need to redirect STDOUT and STDERR 
Author Message
 need to redirect STDOUT and STDERR

is there any way on WinNT to redirect STDOUT and/or STDERR to a log file?

I can't just select a different filehandle for output I need to actually
redirect STDOUT and STDERR so that when someone says:
"print 'hello world';" it goes to one log file but
"die 'hello world';"  goes to another

any help would be greatly appreciated,
Thanks
jk

//*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*//

        Po Box 5291
        Stanford, CA   94309
        (650) 497-6695      
 //*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*//



Sat, 05 Jan 2002 03:00:00 GMT  
 need to redirect STDOUT and STDERR
[posted & mailed]

Quote:

> is there any way on WinNT to redirect STDOUT and/or STDERR to a log file?

Look up the open function in the manual.

perldoc -f open

    open(STDOUT, ">foo.out") || die "Can't redirect stdout: $!";

--
Rick Delaney



Tue, 08 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HELP - with redirect of STDERR and STDOUT

2. redirect STDERR to STDOUT ?????

3. redirecting stderr and stdout

4. writing to terminal even with STDOUT and STDERR redirected

5. assigning STDERR whild redirecting STDOUT to a file

6. Problem with redirecting STDOUT and STDERR

7. How to redirect STDOUT,STDERR and keep the message order

8. Redirect stderr to stdout w/ Perl under Unix?

9. Redirecting STDERR to STDOUT (on NT)

10. HELP - with redirect of STDERR and STDOUT

11. Redirecting stdout/stderr from a call to system()

12. Redirecting STDERR & STDOUT

 

 
Powered by phpBB® Forum Software