A easy example to tell you what is & quot; 2 & gt; & amp; 1 & quot; in Perl, easyexample

Source: Internet
Author: User

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

You can decide if make the output shown on command screen by using 2> & 1 or NUL

Testing script:

Print "without null \ n ";

System ("dir2> & 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 PM <DIR>.

01/22/2015 PM <DIR> ..

01/22/2015 PM 227 calculate. pl

01/22/2015 09:19 AM 194 unicode_test_v1.pl

01/21/2015 05:23 PM 193unicode_test_v1.pl.ba

3 File (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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.