one. DataType (data type ):Perl's data types are roughly four: Scalar (variables), Scalar Array (array), hash array (hash), References (pointer), but they seem to be small but more than sufficient. In particular, you can write a Perl program without
I. Data Types(Data type):
Perl has four data types: Scalar (variable), Scalar Array (Array), Hash Array (Hash), and References (pointer ), it seems to be rare, but it is more than enough to use it. Especially when writing Perl programs, you do not
The meaning of the offset parameter in the ##################### #read () function
Read (FILEHANBD, $var, $length, $offset)
The read function has four parameters, most easily misunderstood is the $offset
It means to look at the official document and
1. Move through the directory tree.When the program runs with the current working directory as the starting point of the relative path, you can use the chdir operator to change the current directory:chdir " / etc " die " Can ' t chdir to/etc:$! "; #
After the installation of active perl5.10 is downloaded from the official website, a simple Perl script is written. Only one file copy module is referenced and the perl interpreter is called to run the script.ProgramWhen a bunch of errors are
Move in the catalog bookChDir Changes the current working directory. It is similar to the CD command in the Shell :ChDir '/etc ' or die "cannot chdir to/etc:$1";Note: The working directory cannot be changed, meaning that the Perl program will return
The first time I came into contact with Perl was in February October 2008. At that time, due to project reconstruction, I needed a lot of text operations, so I picked up the Perl language "text operations as my mission. Of course, the famous llama
I have been learning the perl language recently. The following describes how to use powerful grep functions in perl programming.
1. Grep FunctionGrep has two expressions:
1 grep BLOCK LIST2 grep EXPR, LIST
BLOCKIndicates a code block, usually
1. Change the Directory
Chdir "/etc" or die "can't chdir to '/etc '! \ N ";
If the parameter is omitted, the system returns to the user's home directory, which is the same as that of CD;
2. wildcard file name
My @ all_files = glob "*"; # files
This article will explain in detail how these functions are used. First, we describe the listing file functionality for the dir command in the Python language similar to the Windows system, and then describe how to test whether a file name
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.