Temporarily redirecting STDOUT
From: Fil (fil_at_nospam.thanks)
Date: 09/05/04
- Next message: Paul Lalli: "Re: net::ftp errors"
- Previous message: Shailesh Humbad: "net::ftp errors"
- Next in thread: Brian McCauley: "Re: Temporarily redirecting STDOUT"
- Reply: Brian McCauley: "Re: Temporarily redirecting STDOUT"
- Reply: Joe Smith: "Re: Temporarily redirecting STDOUT"
- Reply: Ben Morrow: "Re: Temporarily redirecting STDOUT"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 05 Sep 2004 22:43:55 +0200
Hi,
I'm writing some Perl (5.8.2) routines on Windows 2000. One of these
routines calls RCS functions like this:
$command = "rcs -x${rcssfx} -l $rcsname";
$rc = system($command);
I'm logging and printing my own error diagnostics, so I'm a little annoyed
that RCS prints to screen what it's doing. I'd like to redirect STDOUT
just for this command.
I understand that I can use open2 or open3 and collect separately the
STDOUT, STDERR and the return code and solve the problem. I'm really
interested here in learning to redirect STDOUT and of course recover it
afterwards. On Unix I'd redirect it to /dev/null... is there anything like
it for Perl on Windows?
Thanks in advance!
Fil
- Next message: Paul Lalli: "Re: net::ftp errors"
- Previous message: Shailesh Humbad: "net::ftp errors"
- Next in thread: Brian McCauley: "Re: Temporarily redirecting STDOUT"
- Reply: Brian McCauley: "Re: Temporarily redirecting STDOUT"
- Reply: Joe Smith: "Re: Temporarily redirecting STDOUT"
- Reply: Ben Morrow: "Re: Temporarily redirecting STDOUT"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|