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
One, List
A list is a sequence of values enclosed in parentheses that can be any value or NULL, such as: (1, 5.3, "Hello", 2), empty list: ().Note: A list containing only one numeric value (for example: (43.2)) is different from the value itself
Deep research on true and false in Perl
This article mainly introduces the in-depth study of true and false values in Perl. This article details the differences between true and false values in Perl. For more information, see
Perl deems the true
The SUBSTR function is a little different in Perl and PHPPublished on April 13, 2009 in Hi.baiduUse substr Same code in Perl and PHP, with different results.Php:Compile error: Can ' t use function return value in write
Preface:
Definition:The concept of singular and plural: Scalar is a single thing. perl uses scalar (the simplest data type in perl) to call a single thing. For most scalar values, it is either a number or a string composed of characters (perl does
Source:Http://www.jb51.net/article/35528.htmOur usage in PerlRequire 5.006When the version number is less than 5.006, the failure is returned, causing the module to fail to load.So its role is to ensure that the module calls the Perl version of the
Read standard input: in Perlforeach () {print "I saw $_";}The diamond operator <>: Its parameters are derived from the @argv array.The @argv array is checked first, and if it is empty, it is entered from the standard input stream. The value of the
This article mainly introduces the method of converting the local time in Perl to the Unix timestamp, mainly using date in Perl::P arse Module, the friends you need can refer to the
When your Perl script needs to resolve time information, here are
Let's take a look at our usage.
Require 5.006When the version number is less than 5.006, the failure is returned, causing the module to fail to load.So its role is to ensure that the module invokes the Perl version of the environment.
Our, like my,
This article mainly introduces how to solve the famous Schwartzian conversion problem in Perl. This article describes the ordering problem involved in the Schwartzian conversion and provides the implementation code, if you need a conversion, refer
How to get started with Linux: the conversion between local time and UNIX timestamp in Perl
Problem: in Perl, I need to convert the readable date and time to the corresponding UNIX timestamp, and vice versa. Can you give me some Perl code examples
First, open, close the file
Syntax is open (Filevar, filename), where Filevar is a file handle, or the program used to represent a file code name, filename is filename, its path can be relative path, can also be absolute path.
Copy Code code
Introduction to Perl Operators
1. Perl Operators
1.1 Arithmetic Operators
Perl is similar to C in both variables and data examples, but its operators and C are almost the same, except for C's example conversion operator type, pointer Reference
Use substr Same code in Perl and PHP, with different results.Php:$addtime = "2009-04-13"; $datetime = "2008-12-31 12:00:00"; substr ($datetime, 0,10) = $addtime; echo $datetime;Compile error: Can ' t use function return value in write contextPerl:#!/
This article mainly introduces Perl famous Schwartzian conversion problem solving implementation, this article explained the Schwartzian transformation involves the sorting question, and also gives the realization code, needs the friend to be
This article mainly introduces the true and false in-depth study in Perl, this article explains in detail the difference between the truth value and the false values in Perl, the need of friends can refer to the
Perl considers truth values to be
Our usage in PerlRequire 5.006When the version number is less than 5.006, the failure is returned, causing the module to fail to load.So its role is to ensure that the module invokes the Perl version of the environment.
Our, like my, are
Usage of CPAN in Perl learning notes
This article mainly introduces the usage of CPAN in Perl learning notes. This article describes CPAN, CPAN's directory functions, and CPAN's installation of Perl Module, for more information, see
CPAN
Let's take a look at the usage of our.
Require 5.006If the version number is less than 5.006, a failure is returned, causing the module to fail to be loaded.Therefore, it is used to ensure the Perl version of the module call environment.
Like my,
Single-line comment and multi-line comment syntax in Perl
This article mainly introduces single-line and multi-line annotation syntaxes in Perl. It also describes the single-line and multi-line annotation syntaxes in other common programming
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.