Here are some notes for learning and using Perl. List one item today:1. Analyze the Matching content of the following regular expression
/^/B [/W.] {1, 12}/B $/
Answer: This regular expression matches a line that starts with a character and
PHP and Perl are becoming enterprise-level PHP, Perl, and other scripting languages that are making remarkable progress at the enterprise level, in concert with traditional technologies. NET and Java. Will your enterprise be ready to adopt it?
1. Search for the required modules from www.cpan.org and download them. the download is generally in GZ or tgz format.
2. Extract and Compress With WinRAR and other software
3. In comman mode, enter the decompressed folder and the directory
[Example 1]
#! /Usr/bin/perlUse strict;
@ _ = (A, B, C, D );
Print "@ _ \ n ";
The output is a B c d.
[Example 2]
Print @ _. "\ n"; # or print @_."";
Number of output @ _: 4
[Example 3]
Print @_;
Display output: ABCD (without spaces)
General output:
Print "$ A \ t $ B \ n ";
Align to the right:
Printf "% 20 s", "1234567890 \ n ";Printf "% 20 s" x @ lines, @ lines;
Align to left:
Printf "%-20 s", "1234567890 \ n ";Printf "%-20 s" x @ lines, @ lines;
Of course,
Perl connection to access database
The prefix is that ActivePerl (505 or above) and MS Access 97 must be installed.
1. Install the Win32-ODBC ModuleStep 1:Download win32-odbc.zip from the toolsbar and use WinZip to unbind it to a temp
On the China Mobile Game channel, the player paradise game in the game player package is now available. As one of the developers, we have added so many classes that we can see the results and are excited. Haha, various PV and UV data statistics
Command: Print
Syntax: Print filehandle list
Note: This filehandle can be seen as a bridge between I (input) and O (output). You can use filehandle to read and write data. stdin indicates the connection from which data is input, for example, input
Use Perl to operate some basic functions of the Registry
Copyright Disclaimer: During reprinting, please use hyperlinks to indicate the original source and author information of the article and this
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.
Posted on Netease blog 13:07:36
1st and 2nd
#! Perl-W# Chapter 4, exercise one and twoUse strict;Sub Total {My $ sum;Foreach $ _(@_){$ Sum + = $ _;}$ Sum;}My @ Fred = (1, 3, 5, 7, 9 );Print "sum of (@ Fred) is: \ t", & total (@ Fred), "\ n ";
Print "
1) sort function
Sort listSort Block ListSort subname list
The usage of sort is as follows. It sorts the list and returns the sorted list. If the subname or block is ignored, sort is performed in the standard string comparison order (for example,
This is a slides made by libreoffice. It is used to introduce colleagues to some basic knowledge about Perl programming. This knowledge is included in several typical camel books, but the purpose, focus, and direction of reading are different for
Comparison of Perl database insertion Methods: Python/ruby1. This article compares the three database insertion methods. A) execute $ something-> execute () cyclically, and control $ DBH-> commit (); B) $ something-> bind_param_array () and $ th->
A few days ago in Look At The ultimate_toolbox source code, from the codeproject down a compilation, a bunch of errors, found that because the compiler can not identify the ISO-8859-1 encoding, misunderstanding of the relevant characters caused, so
Document directory
My debugging Philosophy
Title
Brian's Guide to PerlOutline
Read this guide and stay informedDescribe my debugging Philosophy
I believe there are three things:
This is not a personal issue
Don't always think about your code.
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