When you send a command line to the system shell, the shell creates a process to execute the command. The new process becomes a child of the shell, and its execution does not depend on the shell but coordinates with the shell.
Similarly, a Perl
The judgment of NULL value
$t {Type1id} = $ $pref {dbh}->selectrow_array ("Select Type1id from enq1 WHERE id =
3 ");
if ($t {type1id} = = 0) {
Print "Type1id is null\n";
}
==> is not a numeric term, this statement has a problem. Numeric items are
When the Perl script is run, the arguments passed to it from the command line are stored in the built-in array @argv, @ARGV is the array that Perl defaults to receive parameters, can have multiple arguments, $ARGV [0] is the first parameter that is
1. General use:
@nowtime =localtime ();# ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $ISDST) = LocalTime ();Attention:$mon +1, $year +1900;$now _string = localtime; # e.g., "Thu Oct 13 04:54:34 1994"
2. If you want to save time in a
[ORACLE@YYJK esb]$ cat a1.pl use DBI;
Use HTTP::D ate qw (time2iso str2time time2iso time2isoz);
Use NET::SMTP;
Use Encode;
My $dbName = ' esbdb ';
My $dbUser = ' esbdata ';
My $dbUserPass = ' esbdata ';
My $dbh = Dbi->connect
Http://www.cnblogs.com/morebetter/archive/2007/05/10/741752.html
Many times, we want to make some changes to the contents of the original file, although Linux has sed this powerful text editing command, but he can only generate new files or print
Thread: A scan that uses multithreading to handle large amounts of data and encounters a possible deadlock in read-write files.The life cycle of a Perl thread 1. Use the Create () method of the threads package: Use threads;Sub Say_hello
First, install the ActivePerl, the installation process to automatically add the PATH environment variable, so that after installation, you do not need to manually modify the PATH environment variable;Bring up the command-line window via cmd, enter
Perl class is a Perl Package First, create a package file named cocoa. PM (the extension PM is the default extension of the package, meaning perlmodule ). A module is a package, and a package is a class. Before doing other things, add the line "1;".
Let's take a look at scalar operators. scalar can be divided into two types: Numbers and strings. In Perl, these two types of data can be converted to each other, but operations are different.
The following describes the numeric operators:
There
I. subaccountProgramReferences:
In Perl, you can not only create references to scalar variables, array variables, and hash variables, but also create references to subprograms. References to subprograms are similar to function pointers in C/C ++;
First, let's take a look at the two main functions of POSIX-style Regular Expressions:
Ereg function: (Regular Expression matching)
Format: int ereg (string pattern, string [, array & regs])Note: The preg_match () function using Perl
Chapter 6 pattern matching
By flamephoenix
I. IntroductionIi. Matching Operators3. Special characters in the Mode1. Character +2. characters [] and [^]3. characters * and?4. escape characters5. match any letter or number6. Anchor Mode7. replace
1. Open a file:
$ Openfileflag = open (filehandle, "pattern identifier FILENAME ");
If the file is successfully opened, the true value (non-null) is returned. If the file fails to be opened, the false value (null value) is returned. The default
Perl uses a variable called the file handle type to operate files; perl uses a file handle to establish an I/O channel between files in the program and external memory that can exchange data with external storage media. We recommend that all file
Sending a script a few days ago is very slow. Using Time can only know the total time, but cannot confirm the reason. We found that devel: nytprof is a very good tool.
If you have the root permission, then:
Perl-mcpan-e Shell> Installjson: Any)>
I. Special variables of Regular Expressions:1. $ N: contains the nth substring of the last pattern match.2. $ &: String matched in the previous successful mode3. $ ': Content Before the successful substring4. $ ': content after the child string that
Thread Overview
A thread is a single execution process. It is the smallest control unit in the execution process of all programs.The minimum task unit to schedule. There are both connections and completely different relations between threads and
Open a file using the Open () function
Common methods to open a file are:
Copy codeThe Code is as follows: open (FH, "Or die "Couldn't open $ filename for reading: $! ";
The open () function usually has two parameters. The first is the file handle,
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