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
Variable scope(a) package variables$x = 1Here, $x is a package variable. There are 2 important things to know about package variables:1) If there is no other declaration, the variable is the package variable;2) package variables are always
Chapter 2: References
References are declared as scalar types (named variables starting with $), and reference is obtained using the \ operator.
Modifying the referenced variable is equivalent to modifying the reference pointing to the
I. Introduction of the ModuleModule is the Perl package. The Perl object is based on a reference to the data item in the package.When you use object-oriented programming in other languages, you declare a class and then create an object (instance) of
There are five variables in Perl:
Scalar, pointer, array, hash and handle.
1. scalar
Let's take a look at scalar. scalar is the simplest data type in Perl. Variables of this data type can be numbers, strings, floating-point numbers, and are not
Perl object-oriented first let's take a look at the three basic definitions of Perl Object-Oriented Programming: 1. an "object" refers to a simple reference that "there is a way to know which class it belongs. (An object is a reference variable) 2.
Source:Http://www.cnblogs.com/itech/archive/2012/08/21/2649580.htmlPerl Object Oriented first let's look at three basic definitions of Perl object-oriented Programming: 1. An "object" refers to a simple reference that "has a way of knowing which
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.