且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以将STDOUT和STDERR发送到日志文件,也可以发送到Win32 Perl中的屏幕吗?

更新时间:2023-01-01 17:35:39

您可以在Windows Shell级别将stderr重定向到stdout,方法是:

You can redirect stderr to stdout at the windows shell level by doing something like:

perl stuff.pl 2>&1

有关官方用词,请参见此处的支持文章.

See support article here for the official word.

然后,您可以使用

Then you could use this *** answer to do a tee from the shell.

perl stuff.pl 2>&1 | tee stuff.txt