When I run a Perl script in centos6.6, the "Server Version unavailable ... line 545" issue appears,This is due to the inability to verify the server's SSL certificate.Set the following environment variables to solve the problem:Export
1. Replacements/pattern/replace/; #返回是否更换成功布尔值Ability to use capture variables, such as: s/(\w)/$1/The match fails, no matter what the deal is.2. DelimiterFor delimiters that have no left or right points. Repeated three times can be, such as: s///,
1.hash mode access. %env key is the environment variable name, value is the environment variable2. Call the ENV module. Use Env QW (PATH);Print "path is $ENV {path}\n";This code creates (or overwrites) the Perlvar variable in the environment.$ENV
Loop control:1.lastStatement block for Exit label2.next3.redoNot recommended, cycle times are not controllable4.gotoNot recommended.***************************************Label:Define a label firstLast|next|redo|goto label;Last VS next corresponds
1.PERL4 Kinds of variablesScalar: $ pure variable, scalarArray: @Hash:%File: Uppercase2. Variable composition1. Naming rules case sensitive, alphanumeric underline ...2. No keywords, $+ other, but can not conflict with built-in variables.3. The name
Operator:1.operandoperatorExpressionStatement2. Arithmetic operators+-*/**%-The string join operation must be converted to an integer if it cannot be converted to 0.2. Arithmetic comparisons>==>=!=Note:<> is not an operator, console input3. String
Perl:Practical Extractionand Report Language, practical reports extraction language.Borrowing the features of C, sed, awk, Shell, and many other programming languages is the Dream scripting language for Linux and UNIX. Used primarily for text
Yum installs Cpan and YAML-related packages:Yum Install Cpan perl-yaml*Update Cpan to the latest version and reload CPAN:[[email protected] ~]# cpan Enter ' h ' for help.cpan[1]> install cpancpan[2]>reload CPANModify the site of the CPAN Mirror
First, the definitionA subroutine is a separate piece of code that performs a special task, which can reduce duplication of code and make the program easier to read. In Perl, subroutines can appear anywhere in the program. The definition method
The foreach structure in perl first syntax foreach $rock (qw/bedrock slate lava/) {$rock = "\t$rock"; $rock. = "\ n";}Foreach iterates from the first element of a list (array) to the last element, one iteration at a time. The control variable (in
Arguments is the values you pass to a Perl script. Each value on the command line after the name of the script is assigned to the special variables$ARGV [0],
$ARGV [1],
$ARGV [2], and so on. The number of arguments passed to the script
Due to business needs, to query the customer's IP address and filter out customers in some regions, I began to think of using the IP database. It was a little difficult for me to read pure databases, however, my current time requirements are quite
Recently, I was writing a long Perl script to automate the process and steps for task execution. However, there are some easy-to-error steps, such as my VPN is not enabled or the XX service is not started, so some operations cannot be executed,
The base class is an operating system class.
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Package OS; Require Exporter; @ Isa = QW (exporter ); @ Export = QW (temp
Recently, Perl has been re-learned due to project needs.
To be honest, Perl makes me love and hate. Love it because it is really nice to write your own code. It is the language with the least code and the fastest speed.
Hate is because it is
Document directory
2007-03-22
Use the Perl configuration 2007-03-22tag in Genesis:
Copyright Disclaimer: During reprinting, please use hyperlinks to indicate the original source and author information of the article and this
Today, I saw an article about passing references in parameters. I mentioned a problem. I have encountered it before, but I used other methods to bypass it.
You can solve this problem by passing parameter references. So I plan to write it down. Hope
In Perl, when we need to create a process, we generally use a relatively simple and easy-to-use system, exec, or ''(single quotes). These usage are very simple, however, they cannot combine efficient tasks such as pipelines in the operating system.
Since processing word and PPT on Linux is troublesome and there is a file format patent problem, the following operations are all performed under windows.
First you need to install Microsoft save as PDF add-on, official:
1) The default INC is as follows:
Copy codeThe Code is as follows: @ INC:
C:/Perl/site/lib
C:/Perl/lib
2) set the environment variable PERL5LIB to add it to INC. For example:
Set perl5lib = c: \ perllibs
After perl5lib is set,
Copy codeThe
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