I recently used Perl (using Win32: Ole) to operate Excel. I didn't find similar content on the Internet, so I had to find some beginner knowledge in a book, and I had a great deal with myself, finally, I am a little confused. Here I will make a
Perl built-in variables:-01-04 are Perl built-in variables that you know. If you have any missing variables, post them to add them:
$-Number of printable lines on the current page, part of the perl format system$! Returns the error code or string
There are three types: system, exec, ''(unquoted ).
1. System: After the command is executed, run the Perl script and output it to stdout.
2. Exec: Once you execute this command, Perl will exit and output it to stdout.
3. (My $ output =) '':
1. I am confused. I used to use C ++ for my graduation project. I applied for a written question C. I came to the Company and asked me to develop Java. (Web development for network companies)
2. After one year of Java, no one took over this
Time conversion is inevitable when you use Perl for script development. The following example shows how to convert the system time to the Standard Time:
#! /Usr/bin/perlUse strict;Use dBi;
$ | = 1;
My $ username = "root ";My $ Password = "123456
#! /Usr/bin/perl-W use strict; Use 5.010; sub bigheapadjust ($ /@) { my ($ POs, $ Len, $ ARR) =@_; my $ temp = $ arr-> [$ POS]; # filter sons with large node values to the lower layer. 2 * r + 1 is the left son, 2 * (R + 1) yes right son for (
Address: http://blog.csdn.net/omohe/article/details/1562515
To read a string from a file using Perl, you can use either of the following methods:
1. Read all the content in the file into an array at a time (this method is suitable for small files
1 Perl Automatic Detection
1.1 Command Line Detection Method
You can add the-W parameter to the command line parameters of the first line of the program, as follows:
#! /Usr/local/bin/perl-W
1.2 internal Detection Method of Perl Program
Add the
Index (primary string, substring) starts from 0 and returns the position of the most recent substring in the primary string.
Rindex (Main string, sub-string) Searches from the end and returns the position of the most recent sub-string in the main
There are two good links about this topic:
Http://www.thesitewizard.com/archive/addcgitoapache.shtml http://www.thescripts.com/serveradministration/webservers/apache/virtual-hosting/app/Install_Apache_Web_Server_Perl_PHP_MySQL_on_Windows.html
Steps:
In Perl, when we need to create a process, we generally use a relatively simple and easy-to-use system, exec, or ''(single quotes). These usage are very simple, however, they cannot combine efficient tasks such as pipelines in the operating system.
Previously, I used Scala and go to write a crawler. I recently read Perl and I will write a version with the same functions. Use the lwp: simple module and install it with CPAN lwp (Ubuntu 13.04 does not provide this important module with Perl,
1. Read an object. If the object does not exist, an error is reported and the error cause is displayed.
open (DB, "/home/ellie/myfile") or die "Can't open file: $!\n"; After running, the system prompts: Can't open file: no such file or Director 2.
I am sorry to send a personal advertisement here. If you are interested, you can view it:Http://www.wachnew.com
#! /Usr/bin/perl-W
$ Family_name {"Fred"} = "flinkstone"; # assign a value to the hash key$ Family_name {"Barney"} = "rubble ";
Foreach
The first Perl script was written by a colleague. After this function is implemented in Java, no exception is thrown out in the middle. After Perl is used, it is normal.
My colleagues helped me write the code. I modified and debugged it myself, so I
On the console, enter perldoc perldebug to learn how to debug the Perl program.
The important commands are as follows:
P expr same as "Print {$ DB: Out} expr" in the current package. InParticle, because this is just Perl's own "print"Function,
In order to select a suitable scripting language for learning, I checked a lot about Perl, Python, Ruby, and JavaScript today, but I found that people in various camps are touching their favorite languages, however, it is not controversial that
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.