First love Perl-File Operations

Source: Internet
Author: User

Putty

Regular Expressions
Review:
@ Array
@ Argv
@ Marr multi-dimensional array

Difference between Su and sudo commands
Http://linux.chinaitlab.com/command/730542_2.html
: WQ is mandatory to write files and exit. Write the file forcibly even if it is not modified, and update the modification time of the file.
 
: X write the file and exit. The file is written only when the file is modified and the file modification time is updated. Otherwise, the file modification time is not updated.

View User Permissions
Http://tech.ddvip.com/2008-01/119991599540175.html

Local declares the global variable e0810.pl. From this we can see thatProgramExecute the function first, and then execute other statements (which can be placed before the function). The function is executed in sequence.
What is the difference between package and module? A module is a set of functions.

Input to perform addition, subtraction, multiplication, division

$ A = <stdin>; $ B = <stdin>;
$ Value1 = add ($ A, $ B );
Print "$ value1 \ n ";
$ Value2 = subtract ($ A, $ B );
Print "$ value2 \ n ";
$ Value3 = mult ($ A, $ B );
Print "$ value3 \ n ";

Sub add {
$ Num1 = shift;
$ Num2 = shift;
Return $ num1 + $ num2;
}
Sub subtract {
$ Num1 = shift;
$ Num2 = shift;
$ Haha = $ num1-$ num2;
Return $ Haha;
}
Sub mult {
$ Num1 = shift;
$ Num2 = shift;
$ Haha = $ num1 * $ num2;
Return $ Haha;
}

 

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.