Perl script detects whether a domain name is valid _perl

Scripting function: To detect the specified domain name by using ICMP ping or Tcp/syn to detect the validity of the domain name before probing. file:check.host.pl #!/usr/bin/perl use strict; Use Net::P ing; Use Net::D ns; Use Time::hires qw ();

Flip _linux Shell Using Perl, Python, PHP, Shell, SED, awk, c to implement strings

vps

Original title: Q: There are a.txt files, which are as follows 1234569 ABCABCABC requires awk to print the following results 987654321 CBACBACBA A: Shell: [Root@vps tmp]# rev A.txt 9654321 CBACBACBAPerl: [Root@vps tmp]# perl-nle ' Print scalar

Escape of split in Perl

Everyone in Perl really like to use the split function, which is very useful, but there are two aspects to note. I will give an example to illustrate it. My $ message = "word | words ";My @ word = Split ('/|', $ message );Print $ word [0]; The

About sleep functions in Perl

About sleep functions in Perl Sleep exprSleepThis function allows the script to sleep for expr seconds. If there is no expr, it will be permanently sleep and will return sleepNumber of seconds. You can send a sigalrm Method to the process to

Using Perl code from PHP: php_perl extention, php_perl.dll

In my current project, it has some old code in Perl and new code in both Perl and PHP. the PHP and Perl code need connect each other, especially the session variables. currently, we need PHP to get Perl session variables. Searching on Google,

Perl Learning Method

Address: http://blog.chinaunix.net/uid-28671666-id-3554676.htmlPerl Learning Method Take notes, "a good memory is not as good as a bad pen", the concept, method, skills and other important content must be recorded, so as to deepen the impression

Weird Perl? : Operator trap

A Perl script was written a few days ago :? Operator encountered a very strange problem $ Data-> {$ id}-> {'Total '}?$ Data-> {$ id}-> {'ratio '} = sprintf ("%. 2f % ", 100 * $ data-> {$ id}-> {'succ'}/$ data-> {$ id}-> {'Total '}):$ Data-> {$ id}->

Perl-12-Reference

I. Concept of reference: Perl provides a data type similar to the pointer function in C/C ++, called reference. This reference is different from the reference concept in C ++, but the effect is the same; references in Perl are pointers used to trace

[Experience Summary] Perl extracts webpage Information

#! /Usr/bin/perl-W # gist: https://gist.github.com/2928006use lwp: simple; my $ url = $ argv [0]; my $ filename = $ argv [1]; my $ content = get ($ URL) or die "couldn't get $ URL ";# $ Content = ~ S # ^ .*? (). * $ # m;If ($ content = ~ M #. * ( .*?

Two things need to note for unpack in Perl

In item 116 of the book "valid Perl", author demonstrates how to use unpack to process fix-width columnar data.I tried to write a toy code for practice, and found two things need to note. First thing, must use single quote 'before and after the

Perl tips: File Operations

Translated by saladjonk Audit: Qiang Exit: Chinese Perl Association FPC (Foundation of perlchina) Original Name: Perl circus: File Operation Author: Luke Melia Original article: Table posting: 2002 Perlchina reminds you: please protect the

Zhizhonggen and frontend and backend root traversal. After obtaining the frontend root traversal, the Perl version does not know whether it can be optimized.

Code idea: Construct a tree based on the given two traversal sequences, and then traverse the remaining traversal.         Root traversal + root Traversal       #! /Usr/bin/perl-W use strict; Use List: util QW (first); Use 5.010; my @ tree;

Perl database connection operations

#! /Usr/bin/perl Use strict;Use warnings;Use dBi; Opendir (Dir, "dirpath/") | die "can not open it ";My @ connect = readdir (DIR );Closedir dir; My $ dir_need;Foreach my $ con (sort @ Connect ){If ($ con = ~ /-[0-9] {2}-[0-9] {2 }_/){$ Dir_need = $

Some special symbols in Perl: Z

$-Number of printable lines on the current page, part of the perl format system $! Return Error code or error String Based on the context content $ "list separator $ # default digital output format when printing numbers $ process ID of the perl

Basic Perl knowledge

1 Perl Automatic Detection 1.1 Command Line Detection Method You can add the-W parameter to the command line parameters of the first line of the program, as follows: #! /Usr/local/bin/perl-W 1.2 internal Detection Method of Perl Program Add the

[Perl] IO: Socket Introduction

Use format and common methods (general methods for parent class IO: handle and IO: file are not described below ):========================================================== ========================================================== ==================

Perl regular expressions, common methods for reading files

I haven't written a Perl script for a long time. Recently, my computer has the prison break audio and SRT lyrics. However, the lyrics are incorrect. After the script is processed, you can change your voice to subtitles. It is mainly used to review

Start shell (Perl, Python, Ruby, bean shell, groovy) in several dynamic languages in Emacs)

(Defun Python-shell () "Make a python shell" (Interactive) (Switch-to-buffer (make-comint "Python" "Python" nil "-I "))) (Defun groovy-shell () "Make a groovy shell" (Interactive) (Switch-to-buffer (make-comint "groovy" "policysh" Nil ))) (Defun

Perl draws a traffic line chart based on W3C logs

The company's billing is not based on access logs. However, the original access logs are the most trusted resources, It is often used to test various parameters, such as traffic. Log format: 222.85.90.158--[01/SEP/2012: 00: 00: 00 +

Perl is the first XML document to be created.

Use XML-writer #! C:/perl/bin/Use XML: writer;Use IO;# Open file stream. Param is file name.My $ output = new IO: file ("> output. xml ");# New A output stream.My $ writer = New XML: writer (output => $ output)Or die "create fail ";Print "file

Total Pages: 66 1 .... 36 37 38 39 40 .... 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.