Perl regular expression-1

. Represents any single character and does not match the linefeed.* Is A quantizer, indicating that the previous content appears 0 to multiple times.+ It is also a quantizer, indicating that the previous content appears one to multiple times.

Comparison and Analysis of use and require usage in Perl

Comparison of Perl use and require usage Comparison (1) Description:Both functions mean loading and referencing Perl modules, or sub-functions.Program, The difference is that Perl use is searched in the current default. Once the module is not in

[Original] Perl Regular Expression Basics

. Any single-character wildcard (except \ n)* Matches the previous content zero or multiple times.+ Match the preceding content once or multiple times.? Match the previous content zero or once.Non-Greedy symbols.() Mode group\ 1 reverse (repeated)

Perl debugging command

Http://developer.51cto.com/art/201007/213719.htm Http://www.ibm.com/developerworks/cn/linux/sdk/perl/culture-4/index.html Http://www.sdsc.edu /~ Moreland/courses/introperl/docs/manual/pod/perldebug.html # Name   The default Perl debugger is

Perl calls sub-processes by referencing sub-Processes

Assume that I have a sub-process, which is defined as follows: Sub test_sub {Print "test ";} I have another variable: $ Test = "test_sub "; The value of $ test is the name of the face process. Since I know the sub-process name through $ test,

Several useful Perl modules

Recently I used Perl to write a lot of automated testing tools. I have used some modules and I think it is quite good to record them. I may need to use them in the future. Smart: CommentsSmart comments provides debugging and tracingCodeYou can

Perl file operator glob

Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> # Find the input file list and return an array Sub Arr_argv_file { My   @ Arr_fname   =   @_ ; My   @ Arr_file_list ;

Perl multi-process file lock

Fcntl filehandle, function, scalar Implements the fcntl (2) function. You'll probably have to say Use Fcntl; First to get the correct constant definitions. Argument processing and value returned work just likeIOCTLBelow. For example:

Map in Perl

#! /Usr/bin/perl-wuse strict; my @ array = (5, 'A', 'C', 10, 'B '); my @ new_array = (MAP {$ _ * 2 if M/\ D/;} @ array); print "@ new_array \ n"; print $ # new_array; # print join (",", @ new_array), "\ n "; Map usage Example 21. Convert the file

View the modules with Perl installed

1. perldoc perllocal 2. We recommend pminst commands in pmtools. Http://search.cpan.org/src/MLFISHER/pmtools-1.01/pminst 3. Prepare the following specimens #! /Usr/bin/perluse strict; Use extutils: installed; my $ inst = extutils: installed-> New (

Perl Regular Expression

The first metacharacter is a dot (.). In regular expressions, dots are used to match any single character except line breaks. The simplest wildcard character is + metacharacters. + Match the preceding and subsequent characters at least once or at

Perl calls other Program Methods

1. System ("command ");Use this command to enable a sub-process to execute the command in quotation marks. The parent process will wait until the sub-process ends and continue to execute the following code. 2. Exec ("Command ");The effect is

Perl code snippet-Regular Expression Test Program

Refer to a simple regular expression test program in Perl Getting Started: 1 #! /Usr/bin/perl 2 Use warnings; 3 use strict; 4 5 my $ pattern = $ argv [0]; 6 if (not $ pattern) {7 print "Usage :. /ret. PL pattern \ n "; 8 exit; 9} 10 print" the

Use Perl to write a simple Crawler

Previously, I used Scala and go to write a crawler. I recently read Perl and I will write a version with the same functions. Use the lwp: simple module and install it with CPAN lwp (Ubuntu 13.04 does not provide this important module with Perl,

Debug a Perl Program

On the console, enter perldoc perldebug to learn how to debug the Perl program. The important commands are as follows: P expr same as "Print {$ DB: Out} expr" in the current package. InParticle, because this is just Perl's own "print"Function,

Perl-Chapter 7-roaming Regular Expression kingdom-Exercises

1. Question There are some problems described in the original question. Question 1st: match the row containing fred. Question 2nd: match the rows containing fred or Fred. Question 3rd: match the row containing the vertex number. Question 4th: match

Introduction to the LWP module of perl

Http://hi.baidu.com/jackywdx/blog/item/35bb33daedb414dfb7fd4867.html LWP: Simple Function 1. How to use this module in Perl? Use LWP: Simple; 2. How to get a page content? My $ content = get ('HTTP: // www.yahoo.com.cn ');

Introduction to perl's xml Processing Module

1. Search for existing modulesHttp://search.cpan.org/ 2. Input an XML query and select a module that has a high rating and can meet your needs:XML: SimpleUse warnings;Use XML: Simple;Use Data: Dumper; # Converting XML files into Hash results

Use Perl to create the implementation code of a specified encoding format (such as UTF-8) File

So that some characters (especially wide characters) cannot be correctly displayed, that is, they are no longer in UTF-8 format. Solution:When the output file is opened, the encoding format is specified, so no garbled characters will occur after

Special characters of perl and default internal variables

Special symbols of Perl @ Array$ X {} x is preceded by the dollar sign ($), followed by curly braces ({}), and is a hash element.% To reference the entire hash, use the percent sign (") as the prefix. The hash name used in the previous pages is %

Total Pages: 66 1 .... 45 46 47 48 49 .... 66 Go to: GO

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.