Search for substrings:
Index () and rindex ()
These two functions are used to find strings in strings. The rindex function is the same as the index function, except that it is located later.There are two main usage options: Index ($ string, $
Open the ODBC data source (32-bit) in the control panel, find the user data source list in the user DSN column, select a row named "MSAccess97Database", and press "configure.
This article teaches you how to connect to the Access database under Perl.
I. DBI InstallationWget http://www.cpan.org/modules/by-module/DBD/DBI-1.604.tar.gzTar-zxvf DBI-1.604.tar.gzCD DBI-1.604Perl makefile. plMakeMake TestMake install
Ii. DBD InstallationYum-y intallMysql-develNote the MySQL environment variables. If
In PerlProgram, Read the following line of CCode:
Printf ("% d", number );
Save it to the variable $ line and output it to the file handle $ out. What are the differences between the following two methods?
1) printf $ out $ line;
2) printf $
Chomp is used to remove line breaks.
Copy Code code as follows:
#!/usr/bin/perl
$c = "ABCDE";
Chomp ($c);
print "$c \ n";
[Root@ak]# Perl a.pl
Abcde
Chop is used to delete the last character.
Copy Code
1, Time function: Returns the cumulative number of seconds from January 1, 1970Use: My $t =time ();2. localtime function: Get local time zoneUse: My $t =localtime (Time ());3. gmtime function: Get GMTUse: My $t =gmtime (Time ());Get the format time (
The Spreadsheet::WriteExcel and spreadsheet are available on Linux or UNIX (generated) Excel,cpan::P arseexcel these two modules.
Here's a look at Spreadsheet::WriteExcel and spreadsheet: How to use the:P arseexcel.
First, install the appropriate
Here is an example:
Copy Code code as follows:
Use strict;
#这里是两个数组
My @i = (' 1 ', ' 2 ', ' 3 ');
My @j = (' A ', ' B ', ' C ');
#在进行处理之前, we'll print them out and look at them.Print "In the main program before calling
Using signal, you can make your program more functional. To get all the signal under Linux, use the kill-l. Here is the output on my machine (which is not listed in the following 64):
Copy Code code as follows:
xuyang@xuyang-desktop:
First, Introductionpattern refers to the character of a particular sequence that is searched for in a string, which is included by a backslash:/def/, Mode def. Its usage, such as combining function split, splits a string into multiple words in a
Type of statement
A computer is a tool that has the advantage of performing repetitive tasks. Loop execution, loop statement.Need to make a lot of judgments, conditionally executed, conditional statements.Sequential statements.Summary of True and
The first step is to install the WIN32-ODBC module, which is as follows:
1: Download the win32-odbc.zip from the Tools column, download the WinZip to a temp directory after downloading, a total of three files:
Readme
Win32-odbc.ppd
perl| Function | Array describes the very useful "array" functions in several PHP4
1 void Extract (array var_array [, int extract_type] [, string prefix]])
Expands an associative array to the variable name and the value of the variable, and if
Perl:warning:Falling back to the standard locale ("C").
Perl:warning:Setting locale failed.
Perl:warning:Please Check that your locale settings:
LANGUAGE = (unset),
Lc_all = (unset),
LANG = "ZH_CN." Gb2312;zh_cn. Utf-8;en_us;en_us. UTF-8 "
are
The <> operators in Perl can be used for the following purposes:
1 if the middle of the angle bracket is a file handle, the angle bracket operator allows you to read the file handle, such as .2 If the middle of the angle bracket is a search pattern,
Copy Code code as follows:
Mainly used to collect IP, Mac, name, room, and then added the maintenance record function. The server side accepts the data and stores it in the database.
#############################
Use strict;
Use Tk;
Use
I'm not sure if undef has a definite relationship with the elimination of values from the array, guess what, if we treat undef as "empty," there will be some connection. But generally, assigning something to undef and deleting something is different.
Sometimes when we deploy a script, we want to know how our program is performing, and we want to get the results of execution, so we can rest assured that a lot of it is good to be able to send me a message when the program succeeds or fails.
In
Perl use vs. require usage
Contrast (i) Description:Both of these functions are a means of loading and referencing Perl's modules, or subroutines,
The difference is that Perl use is found in the current default, and once the module is not in the
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.