Some common functions written in Perl

######################################## #################### Function: Get the current time# Parameter: None# Return Value: return time in the format of yyyymmddhhmmss######################################## ###################Sub get_time{My ($

Perl parameter symbol (Memo)

Perl built-in variables:-01-04 are Perl built-in variables that you know. If you have any missing variables, post them to add them: $-Number of printable lines on the current page, part of the perl format system$! Returns the error code or string

Conversion between Perl Chinese/Unicode/utf8/gb2312

the conversion between Perl Chinese/Unicode/utf8/gb2312 encoding is a headache. I have summarized the following conversion methods for your reference. # Author: jiangyujie Use utf8; Use encode; Use URI: escape; $/= "/N"; # utf8 encoding

Extract files across platforms using Perl

Our project has many testing platforms, including Windows and Linux. Linux provides an unzip command for decompression, but it is troublesome in windows. in Windows 2000, no command is provided to decompress the file. In XP, The unzip command is

[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)

Method for directly generating documents from Perl code

Perl supports generating documents from text blocks in your pod format. This pod text block can be embedded in CodeOr a separate file. With the pod, It is very convenient to write a script without having to write additional documents. We

Regular Expression Processing for HTML instances (Perl implementation)

1. Tag extraction in HTML ])*> 2. Extract the URL and link text in the label. While ($ html = ~ M {A \ B ([^>] +)> (.*?) }ig) {my $ guts = $1; my $ link = $2; if ($ guts = ~ M {\ B href # href attribute \ s * = \ s * # A blank character (? : #

Perl file reading

Address: http://blog.csdn.net/omohe/article/details/1562515 To read a string from a file using Perl, you can use either of the following methods: 1. Read all the content in the file into an array at a time (this method is suitable for small files

How to Use Perl to call. NET Web Services

The source code is as follows: C # code [Webmethod] Public String Hello (){Return "Hello World "; } Perl code 1:#! /Usr/bin/perl-W Use strict;Use soap: lite; Print soap: Lite-> Uri ('HTTP: // tempuri.org ')-> On_action (sub {sprintf '% S/%

Use Perl to query the home location of the mobile phone number

      Sometimes you will receive an anonymous phone number that is "immediately hung up after the phone call". Sometimes you don't pay attention to it. There are several "missed phone calls" on

Perl string and sorting

Index (primary string, substring) starts from 0 and returns the position of the most recent substring in the primary string. Rindex (Main string, sub-string) Searches from the end and returns the position of the most recent sub-string in the main

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,

Learning Perl Chapter 1 exercise

Posted on Netease blog 13:10:11 1st print the last name based on the entered person name #! Perl-W# GetfamilynameUse strict;My % nametable = ("Fred" => "Flintstone", "Barney" => "rubble", "Wilma" => "Flintstone ");Print "input person name, and the

Getting started with Perl-Application of hash

I am sorry to send a personal advertisement here. If you are interested, you can view it:Http://www.wachnew.com   #! /Usr/bin/perl-W $ Family_name {"Fred"} = "flinkstone"; # assign a value to the hash key$ Family_name {"Barney"} = "rubble "; Foreach

Simple use of Perl's objective CT and XML modules

Trusted CT. PM module: Mainly used to interact with another server, such as FTP and telnet. It is also frequently used in writing monitoring data.The method I used is very simple,Spawn ($ command, @ Params), forks and execs $ command. returns an

Solutions to Perl script errors during carbide Compilation

I also saw it in another blog, but I cannot find it on the Internet now. Fortunately, I recorded it:   If you use Carbide to compile any project, the following error occurs:=== Build command =/C abld build winscw udeb-V

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,

Comparison between Perl, Python, Ruby, and Javascript

In order to select a suitable scripting language for learning, I checked a lot about Perl, Python, Ruby, and JavaScript today, but I found that people in various camps are touching their favorite languages, however, it is not controversial that

Perl-Chapter 5-input and output-Exercises

1. Exercise 2. Code and Output Cat_reverse.pl1 #-----------------------------------------------------------# 2 # Source: Learning Perl, chapter5, exercise-1 3 # Date: 2012-01-15 4 # Author: xiaodongrush 5 #-------------------------------------------

Shell perl python

Shell: an interface that directly interacts with the Linux kernel. It is relatively basic and used to process basic and simple tasks, such as batch processing.Perl: it is more complex and powerful than shell, and has a powerful regular expression

Total Pages: 66 1 .... 42 43 44 45 46 .... 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.