A easy example to tell you what is "2>&1" in Perl

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

时间: 2024-10-11 07:51:54

A easy example to tell you what is "2>&1" in Perl的相关文章

C++开源库集合

| Main | Site Index | Download | mimetic A free/GPL C++ MIME Library mimetic is a free/GPL Email library (MIME) written in C++ designed to be easy to use and integrate but yet fast and efficient. It is based on the C++ standard library and heavily us

地理数据可视化:Simple,Not Easy

如果要给2015年的地理信息行业打一个标签,地理大数据一定是其中之一.在信息技术飞速发展的今天,“大数据”作为一种潮流铺天盖地的席卷了各行各业,从央视的春运迁徙图到旅游热点预测,从大数据工程师奇货可居到马云布道“DT”时代,“大数据”被推到了一个前所未有的高度,连国家领导人出访演讲都言必称大数据.地理信息数据天生具有大数据属性,作为整天和地理信息数据打交道的地信人自然不甘落后,地理大数据概念脱颖而出. 地理大数据是什么?大体来说就是把社会经济.自然资源.商业信息等但凡具有一点空间维度的数据一股脑

哈理工2015暑假训练赛BNU16488 Easy Task(简单题)

A - Easy Task Time Limit:2000MS    Memory Limit:65536KB    64bit IO Format:%lld & %llu SubmitStatusPracticeZOJ 2969 Description Calculating the derivation of a polynomial is an easy task. Given a function f(x) , we use (f(x))' to denote its derivatio

Designing CSS Layouts With Flexbox Is As Easy As Pie

This article is an updated excerpt of the chapter "Restyle, Recode, Reimagine With CSS3″ from our Smashing Book #3, written by Lea Verou and David Storey. - Ed. Flexible box layout (or flexbox) is a new box model optimized for UI layout. As one of th

27. Remove Element【easy】

27. Remove Element[easy] Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. The order of elements can be ch

26. Remove Duplicates from Sorted Array【easy】

26. Remove Duplicates from Sorted Array[easy] Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with consta

Jquery Easy UI 实现页面的Loading效果(类似于Android的ProgressDialog)

前言 很常用的一种前端效果,比如当用户点击网页的某个按钮发送了一条异步请求,如果响应时间过长容易导致用户重复点击,一方面影响用户体验一方面容易造成不必要的服务端压力,Easy UI有现成的mask样式,简单封装一下就可以使用,之前查阅搜集了相关资料和文章,发现都介绍的都不是很完整,所以本篇blog就完整的记录一下通过Easy UI快速实现这种效果以及如何集成到项目中. 引入.封装和调用 首先当然是在我们的项目中集成jquery以及easyui的相关资源包,除了jquery的核心js文件,easy

Easy VPN

Easy VPN路由器上配置 R1(config)#aaa new-model 定义AAA R1(config)#aaa authentication login vpn_authen localR1(config)#aaa authorization network vpn_author localR1(config)#username cisco password ciscoR1(config)#crypto isakmp policy 10 定义一阶段策略的SA参数 R1(config-i

an easy problem(贪心)

An Easy Problem Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8333   Accepted: 4986 Description As we known, data stored in the computers is in binary form. The problem we discuss now is about the positive integers and its binary form.