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
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
Reference
Common Perl Command Line options
Common unix Commands: perl implements sed awk tr nl
Perl, sed, awk, tr, grep, nl, and other common commandsSed
Task
Sed
Perl
Replace12WithTwelve
sed 's/12/twelve/g'
perl -pe '
Grep function introduction-general Linux technology-Linux programming and kernel information. The following is a detailed description. Grep function Introduction
[Table = 98%] [tr] [td = 100%,] [/td] [/tr] [/table]
Grep Function
(If you are a
CopyCodeThe Code is as follows :#! /Usr/bin/perl
#
# Use grep map to obtain the Intersection Set and supplement set of the two lists
#
Use strict;
My @ A = ("A", "B", "C", "D", "E ");
My @ B = ("B", "g", "F", "E ");
Print "list a data: @ A \
A) Sort function usage
Sort LISTSort Block LISTSort SubName LIST
The use of sort is in the form of 3 different forms. It sorts the list and returns the sorted lists. If SubName or Block,sort are omitted in the standard string comparison order (for
1) grep function grep has two expressions: grep block listgrep expr, listblock represents a code block, usually represented by {}; expr represents an expression, usually a regular expression. In the original article, expr is anything, including one
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
A) Sort function usageSort LISTSort BLOCK LISTSort SubName LISTThe use of sort is in the form of 3. It sorts the list and returns the sorted lists. If the subname or Block,sort are ignored in the order of standard string comparisons (for example,
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.