Perl Arraysa Perl array is a list variable that stores scalar values, and variables can be of different types. array variables begin with @. Access array elements are read using the $ + variable name + [index value] format. 1. Creating an array1.
Process processing functions
1. Process Start functionFunction name EvalCall Syntax eval (string)The commentary considers a string as a Perl statement execution.When executed correctly, the system variable $@ is an empty string, and if there is an
Most statement expressions in the Perl language are followed by a semicolon, separating the different Perl statements.The Perl interpreter can compile and run these two actions at a time. Perl uses a pair of anti-quotes "'" to indicate running
All numbers have the same format internally in prel. In fact the Perl use double-precision floating-point value to store numbers.
Creating charaters by code point: CHR (), and ord () metheds.
E.g.
$alef = chr(0x05df) ;$code_point = ord('d') ;
In
The previous article lists the similarities and differences between the ways of objects and JS in Perl. This continues to complement the array, the hash of the associated operation.
One, array
You can add additions and deletions to the array.
Perl Common function set 2
I. Process processing functions1. Process startup FunctionFunction Name evalCall the syntax eval_r (string)The description regards string as a Perl statement execution.After the command is correctly executed, the
I. Process processing functions
1. Process startup Function
Function Name eval
Call the syntax eval (string)
Describe the stringPerlStatement execution.
After the command is correctly executed, the system variable $ @ is an empty string. If an error
There are four common functions for array manipulation in Perl:Push: Adds an element from the end of the array.Pop: Extracting elements from the end of an arrayShift: Extracting elements from the beginning of an arrayUnshift: Adding elements from
This module uses the perl array to represent a file. each row of the file corresponds to an element of the array. The first behavior element is 0, and the second response is 1 ,...The file itself is not actually loaded into the memory, and the
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.