A easy example to tell you what is "2>&1" in Perl
来源:互联网 发布:淘宝海蝶hifi音乐会馆 编辑:程序博客网 时间:2024/06/06 03:06
You can decide if make the output shown on command screen by using 2>&1 or NUL
Testing script:
print "without null \n";
system("dir 2>&1");
print "with null \n";
system("dir > NUL");
print "end \n";
Result:
C:\Rebecca\script\perl\Unicode>perl calculate.pl
without null
Volume in drive C isOSDisk
Volume Serial Numberis BA23-5612
Directory of C:\Rebecca\script\perl\Unicode
01/22/2015 04:59PM <DIR> .
01/22/2015 04:59PM <DIR> ..
01/22/2015 04:58PM 227 calculate.pl
01/22/2015 09:19AM 194 unicode_test_v1.pl
01/21/2015 05:23PM 193unicode_test_v1.pl.ba
3File(s) 614 bytes
2Dir(s) 175,476,535,296 bytes free
with null #you can see with NUL, there isn't any output shown here
end
- A easy example to tell you what is "2>&1" in Perl
- What To Tell Your Manager In Your Employee Performance Review
- Learning Perl: 6.1. What Is a Hash?
- Click to tell us what you think:翻译成多国语言是啥样子
- "What does my face tell you, Signorina?"
- To tell you the truth
- What is Daemon Thread in Java? Example Attached
- What is the best way to implement a heartbeat in C++ to check for socket connectivity?
- (Page 2 of 3 )A walking tour of JavaBeans 2 :What JavaBeans is, how it works, and why you want to use it
- (Page 1 of 3 )A walking tour of JavaBeans What JavaBeans is, how it works, and why you want to use it
- What is a metaclass in Python?
- What is a plug-in fragment?
- what-is-a-metaclass-in-python
- In C++, what is a memory arena?
- what happens when you type in a URL in browser
- What is meant by back propagation in an ANN compared to a biological neural network?
- Gmail is different. Here's what you need to know.
- You need to install a terminal library; for example ncurses.
- 自定义漂亮的RadioButon(使用shape)
- Android 避免APP启动闪黑屏的解决办法(Theme和Style)
- <img>正则表达式
- 软连接 硬链接
- 深入浅出学习Struts1框架(二):重构MVC模式代码中跳转路径和业务逻辑
- A easy example to tell you what is "2>&1" in Perl
- 补码相关知识
- ie兼容性测试的问题
- 深入浅出学习Struts1框架(三):彻底去掉TestServlet中的字符串和if-else语句块
- Android studio一些快捷键,从别人那拷贝的
- asp.net 文件上传验证是否是真正的图片格式
- 2.7-2.8 数值自乘求解 C实现
- 深入浅出学习struts1框架(四):从MVC模式代码认识struts1框架
- HDU 2544 最短路(最短路入门)