If you have other scripting languages, please also list the reply content if you have other scripting languages:
Sed-when you need to do simple text transforms on files.
Awk-when you only need simple formatting and summarization or transformation of data.
Perl-for almost any task, but especially when the task needs complex regular expressions.
Python-for the
If there are other scripting languages, please also list
Reply content:
Sed-when you need to does simple text transforms on files.
Awk-when need simple formatting and summarization or transformation of data.
Perl-for almost any task, but especially when the task needs complex regular expressions.
Python-for the same tasks that's could use of Perl f
Compared with Perl, Perl is still relatively small. It is quite convenient to watch videos when getting started, just like watching movies. I have read almost every episode of Superor. I hope you can take a closer look.
Note: You need to write more during learning. You can only understand that only 5% of your work is yours. If you do all the exercises, 30% of your work will be yours. If you can write your
What is a scripting language? , scripting language?
####### #概念 ########
The language that can be used to program and execute the source code directly.
####### #特点 ########
1, do not need to compile a binary executable file, but directly execute the source code of a class of languages.
2, script language can not run away from the source code, the compiler language is just the opposite.The compiled
What is a scripting language ?, Script language ?. What is a scripting language ?, Scripting language? ################ Languages that can be programmed and directly run source code. ################ 1. do not compile binary statements. what is a script language ?, Scripting language?
######## Concept ########
Lang
pass an array or a hash class.
Array:
Copy Code code as follows:
My @testArray = (1, 3, 2);
#In Sub Sub Processarraybyreference ($) {
my $arrayref = shift;
My @array = @ $arrayref;
#...
}
#In Sub Processarray:sub processarraybyvalue ($) {
my @array = @_;
#...
}
Processarraybyvalue (@testArray);Processarraybyreference (\ @testArray);
HA series:
Copy Code code as follows:
Sub Printhash ($) {
My%hash =%{shift ()};
For my $k
Preface
PHP is widely used in the background CGI development of the web, usually after the user data data to obtain a certain result, but if the user input data is incorrect, there will be problems, such as someone's birthday is "February 30"! What should I do to check whether the summer vacation is correct? With the support of regular expressions in PHP, we can make data matching very convenient.
What is a regular expression
In short, regular expressions are a powerful tool that can be used fo
, The interpreter (interpreter) needs to read the source code that we wrote and convert it to the target (object), which is then run by the computer. Because each execution of the program is more than the compilation process, so efficiency has decreased.The advantage of using scripting languages is that they are mostly run at a higher level than the compiled language and can easily handle objects such as files and directories, and the disadvantage is
Assume that the Perl language and MySQL database are installed.
DBI Installation: DBI Detailed information reference: http://dbi.perl.org/1. Download DBI Package:
wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.620.tar.gz
2 Decompression
Tar xzf dbi-1.620.tar.gz
3 into the unpack package,
Perl makefile.pl
4 Make Test
5 Make
6 make install (if not root user, sudo)
DBD Installation:
1
Let's take a look at the two main functions of the POSIX-style regular expression:
Ereg function: (Regular expression matching)
Format: int ereg (string pattern, string string [, array regs])
Note: the Preg_match () function that uses Perl-compatible regular expression syntax is usually a faster alternative than ereg (). (Generally speaking or using Preg_match (), better le ~ ~)
Finds substrings in a string that match the pattern of a given regular
Use regular expressions compatible with Perl in PHP. Preface PHP is widely used in Web background CGI development. it usually produces some results after user data. However, if user input data is incorrect, problems may occur, such
Preface
PHP is widely used in Web background CGI development. it usually produces some results after user data. However, if the user input data is incorrect, a problem may occur, for example, a person's birthday is "August
The comparison between POSIX and Perl-compatible regular expressions (preg_match, preg_replace ,. First, let's take a look at the POSIX regular expression's two main functions: ereg function :( regular expression matching) format: intereg (stringpattern, stringstring [, arraylt ;? Phpif (first, let's look at the two main functions of POSIX-style regular expressions:
Ereg function: (regular expression matching)
Format: int ereg (string pattern, strin
Comparison of Perl, PHP, Python, Java and Ruby. Preview ◆ the development trend of the language must be a combination of dynamic and static data and a combination of flexibility ◆ Perl concise and obscure, Python elegant and clear, Ruby exquisite and smart, PHP concise and simple ◆ perhaps elegance is exactly from the fine
Preview
◆ The language development trend must be dynamic and dynamic combination
We've covered Ajax, so let's talk a little about remote scripting. You might think, "What's the big deal about Ajax?" I've already done the same thing with IFRAME. "In fact, we have used this method ourselves," he said. This is commonly referred to as Remote scripting (scripting), which many people think is just a patchwork. However, this does provide a mechanism
# Perl concise tutorial#1. perl uses # as a single line comment# Multi-line comments are enclosed by pod = cut as follows: multi-line comments= PodMultiline comment= Cut#1. Variables# There are only three variables in perl#1. Common variables (scalar)#2. Array variables (list)#3. hash variable (hash table)# Declaration
Brief introduction
Ruby is an extremely rich, free, simple, extensible, portable, object-oriented scripting language. Recently, it has been widely popular in the Web field. This is partly due to the very powerful WEB application development Framework Rails,rails is written in Ruby. Rails, also known as Ruby on Rails (ROR), as the name suggests, provides a very powerful platform for fast and effective development of WEB applications. It is highly scal
Use PHP as the Shell scripting language. We all know that PHP is a very good dynamic web page development language (fast speed, short development cycle ......). However, only a few people realize that PHP can also be well written. we all know that PHP is a very good dynamic web page development language (fast speed, short development cycle ......). However, only a few people realize that PHP can also be a good language for writing Shell scripts. When
How to use PHP as a Shell scripting language. We all know that PHP is a very good dynamic web page development language (fast speed, short development cycle ......). However, only a few people realize that PHP can also be well written as S.
We all know that PHP is a very good dynamic web page development language (fast speed, short development cycle ......). However, only a few people realize that PHP can also be a good language for writing Shell scri
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.