Perl substr () Function example, substr () function instance code-returns the substring of expr, starting with offset within the string.
Grammar:
Substr EXPR, OFFSET, LEN, replacementSubstr EXPR, OFFSET, LENSubstr EXPR, OFFSET
Definitions and
one. DataType (data type ):Perl's data types are roughly four: Scalar (variables), Scalar Array (array), hash array (hash), References (pointer), but they seem to be small but more than sufficient. In particular, you can write a Perl program without
I. Data Types(Data type):
Perl has four data types: Scalar (variable), Scalar Array (Array), Hash Array (Hash), and References (pointer ), it seems to be rare, but it is more than enough to use it. Especially when writing Perl programs, you do not
The SUBSTR function is a little different in Perl and PHPPublished on April 13, 2009 in Hi.baiduUse substr Same code in Perl and PHP, with different results.Php:Compile error: Can ' t use function return value in write
Use substr Same code in Perl and PHP, with different results.Php:$addtime = "2009-04-13"; $datetime = "2008-12-31 12:00:00"; substr ($datetime, 0,10) = $addtime; echo $datetime;Compile error: Can ' t use function return value in write contextPerl:#!/
Process processing functions
1. Process Start functionFunction name EvalCall Syntax eval (string)The commentary considers a string as a Perl statement execution.When executed correctly, the system variable $@ is an empty string, and if there is an
Before studying the basics of Perl, we would like to have a chance to see the following Perl introduction. Baidu Encyclopedia
First, basic types of Perl
The basic type of per is divided into two types: numeric type and string type.
Numeric types can
Here is the DNA sequence, stored under window F:\perl\data.txt:
Copy Code code as follows:
Aaaaaaaaaaaaaagggggggttttcccccccc
Cccccgtcgtagtaaagtatgcagtagcvg
Ccccccccccggggggggaaaaaaaaaaaaaaattttttat
Aaacg
Here's the
As we all know, Perl is very powerful in processing strings, and Perl (Practical Extraction and Reporting Language) is also very powerful in processing formats. Here we start to learn some Perl formats and string processing.
Familiar with the three
With the in-depth development of network security requirements, network-based intrusion detection technology has become an important and interesting research direction. Want to learn NIDs technology in addition to read some ready-made information
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.