Summary:1. Using built-in warning information2. Using the Perl Help documentDetails:1. Built-in warning information-Perl can warn you when there are "suspicious things" running in your program-The warning does not change the behavior of the program, just as an auxiliary hint to the programmer. The programmer is prompted when Perl's interpreter considers the code to be problematic, but does not prevent the p
Read standard input:foreach (The diamond operator The @argv array is checked first, and if it is empty, it is entered from the standard input stream. The value of the @ARGV can be from the command line, or you can assign a value yourself.The value of the./program Fred Barney Betty # @ARGV is three files after the command line.while (Standard output in Perl: Print. When you output multiple items, you can separate them by adding "," and enclose them in
due to a running error =; pay attention to this when calling by reference;
In addition, you can use aliases to pass array parameters. When you call an array in the form of my_sub (@ array, perl copies all elements in the array @ array to the @ _ array of the subprogram. When the array @ array is large, this call method consumes resources and time, low efficiency; usableAlias TransferArray to avoid this copy operation, in order to directly operate
This article mainly introduces the true and false in-depth study in Perl, this article explains in detail the difference between the truth value and the false values in Perl, the need of friends can refer to the
Perl considers truth values to be self-evident (self-evident), which means that the truth of any thing can be computed.
Perl object-oriented first let's take a look at the three basic definitions of Perl Object-Oriented Programming: 1. an "object" refers to a simple reference that "there is a way to know which class it belongs. (An object is a reference variable) 2. A "Class" refers to a simple package that "can provide some methods to its objects. (Class is the package) 3. A "method" refers to a simple sub-statement that "a
Mrtg (Multi Router Traffic Grapher, MRTG) is a tool software used to monitor network link Traffic load. It obtains device Traffic information through the snmp protocol, the traffic load is displayed to the user in HTML document format that contains PNG format, and the traffic load is displayed in a very intuitive way. The following describes how to install Perl and Mrtg for MRTG windows traffic monitoring.
Install
1. do:
1) form:Do 'filename ';Note:Here, single quotes must be added to filename; otherwise, an error will occur;Filename can be any suffix or even has no suffix. Do not ask for pl or pm.
2) do:Do 'filename'First, you must read the filename file. (If the read fails, undef is returned and $ is set! Variable );If the read is successful, then compile the statements read by filename (if compilation fails or compilation is incorrect, undef is returned and the error message is set to $ @ variable );If
Capture warning information and exception information in Perl and write logs
This article describes how to capture warning information, exception information, and write logs in Perl, this article provides practical examples of capturing warnings-not processing, capturing warnings-and converting them into exceptions, capturing warnings-and writing logs, capturing and writing logs, for more information, see
A
Most of the people who started using Perl in Windows use ActivePerl. But for those familiar with Perl programming in Linux, strawberry Perl will become more used to it. After all, the update of the ActivePerl ppm package is too slow. If you need to manually compile the CPAN package, you might as well use strawberry Perl
What is a closure? "This is a notion Out Of The LISP world that says if you define an anonymous function in a particle lexical context, it pretends to run in that context even when it's called outside of the context. "[2 ]. In the object-oriented language, "a closure is a callable object thatRetains information from the scope in which it was created. from this definition, you can see that an inner class is an object-oriented closure, because it doesn' t just contain each piece of information fro
Here is the DNA sequence, stored under window F:\perl\data.txt:
Copy Code code as follows:
Aaaaaaaaaaaaaagggggggttttcccccccc
Cccccgtcgtagtaaagtatgcagtagcvg
Ccccccccccggggggggaaaaaaaaaaaaaaattttttat
Aaacg
Here's the program:
Copy Code code as follows:
#下面的程序是用来计算一段DNA序列中ATGC的数量的
#首先定义四种碱基的数量为0$count _a=0;$count _t=0;$count _c=0;$count _g=0;#首先要先把序列进行合并成一行
#先确定所要处理的文件的路径及文件名 (under Windows system, follow th
The previous article lists the similarities and differences between the ways of objects and JS in Perl. This continues to complement the array, the hash of the associated operation.
One, array
You can add additions and deletions to the array. Unlike JS is that these functions are global, JS is hanging on the array.prototype.
1, the operation of the tail of the array POPs (delete the last element), push (added at the tail)
@goods = Qw/pen pe
current location of the file
1__ve_item__øtruncate function
The TRUNCATE function receives two parameters: a file handle and a file byte position. It starts removing records from the file byte until the file ends.
Perl String processing functions
Perl String handler function index
Call Syntax Position=index (string,substring,position);The narration returns the position of the substring substring in st
There are several prompt variables to mention when the color of the terminal is mentioned under the shell:
PS1: The default prompt, that is, after the remote boarding system, open the terminal, we see the familiar prompt every day;
[Root@vps ~] $echo $PS 1[\u@\h \w]$
PS2: It is our command line to write the "\" on our command line, and the one that is displayed on the other line;
[Root@vps ~] $echo "Hello" \> "World"Hello World[Root@vps ~] $echo $PS 1[\u@\h \w]$
PS3: That's the one we show
Windows 2000+apache+mysql+php3+php4+perl Installation Usage SummaryWww. 1000script.com 2002-9-3 1000script Professional ScriptWindows 2000+apache+mysql+php3+php4+perl Installation Usage summary (i)There must be a lot of friends like me who want to try something new, especially when they hearSo-and-So software has a new version must also be eager to download a copy back for use.Here I would like to discuss w
Windows 2000+apache+mysql+php3+php4+perl Installation Usage SummaryWww. 1000script.com 2002-9-3 1000script Professional ScriptWindows 2000+apache+mysql+php3+php4+perl Installation Usage summary (i)There must be a lot of friends like me who want to try something new, especially when they hearSo-and-So software has a new version must also be eager to download a copy back for use.Here I would like to discuss w
Author: A Hui http: farmerluo. googlecode. how to install comfilescheck_redis.pl: When the script uses the perl Redis database, you must first install this: # perl-MCPAN-eshell # installRediswgethttp: farmerluo. googlecode. comfilescheck_redis.plcpcheck_redis.p
Author: A HuiHttp: // faRmErluo.googlecode.com/FileS/check_rEdIs. plThis section describes how to install:The script uses the
Configure cdperl-5.8.8./Configure-demakemaketestmakeinstall Several Notes: 1-de is the configuration parameter, meaning the default configuration; 2 here there is a step
If you want to use perlto analyze the timeline and exceldata in ora 8.0, download perl-5.8.tar.bz2 from chinaunix,
Tar jxvf perl-5.8.8.tar.bz2Cd perl-5.8.8./Configure-deMakeMake testMake instal
perl directory.
Installation:
1. Run the "cmd" command, enter the MS-DOS, and check whether Perl is properly installed under the EG folder of the Perl installation directory:
Cd c: \ Perl \ Eg
Run Perl example. pl in this directory.
If "hellofrom ActivePerl!" is displayed
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.