Method 1:
The two-day use of MAVEN in building an application, because project is very large, there are more than 700 pom.xml files, and even more depressing is that in many pom.xml files are individually specified in the repository URL, I need to
Occasionally write Perl script, with Eclipse open too slow, NotePad bar, color is too monotonous, notepad++ no doubt is not a good choice, but when you want to enter Chinese comments, often jam very uncomfortable, and finally choose to use EditPlus,
Copy Code code as follows:
#!/usr/bin/perl
#use Strict;
Open (FILE1, "c:/perl/bx/bx-users.csv");
Open (FILE2, "c:/perl/bx/bx-books.csv");
Open (FILE3, "c:/perl/bx/bx-book-ratings.csv");
Open (RESULT1, ">c:/perl/bx/bx-users.txt");
Open the file with the open () function
The common ways to open files are:
Copy Code code as follows:
Open (FH, "Or die "couldn ' t open $filename for reading: $!";
The open () function usually comes with two arguments, the
1. Perl "Glue" enables the integration of code in various applications or languages.Perl can write common scripts, and you can use CGI modules to write Web applications, and you can use DBI to access various databases.In addition to this, Perl can
deleting files
Use the Unlinke function, such as unlink $file, unlink $file 1, $file 2, $file 3
Open File
Opening the file in the form of three parameters makes it easy to differentiate between the schema and the file name, which is supported by
First, determine whether the module has been installed: (reference:Http://cooloo.lofter.com/post/1906f2_5eabbe)Perl " print\ "Module installed\n\" "Second, how to install the module:
Most of the time, we want to modify the content of the original file. Although the powerful text editing command sed exists in Linux, however, he can only generate new files or print them to the screen (perhaps sed also has the ability to modify the
SeeArticle: Http://space.itpub.net/82392/viewspace-238018
However, some functions cannot be used because they are too old.
# Install PerlYum install-y Perl *
# Install unixodbc### Install the support library as needed### Yum-y install
# Recently, I used to deal with time issues. I simply wrote several functions. #! /Usr/bin/perl-W #================================ ========================================================== ========## copyright (c) 2009, # All Rights Reserved. #
Log scrolling to get information in tail-F. If "too has open files" exists, restart Apache.
#! /Usr/bin/perlmy $ now = localtime (time); & write_log ("$ now start reahache. PL \ n ". '----------------------------------'. "\ n"); open tail,
1. The use strict command means that all variables must be declared using my, and bare words must be enclosed in quotation marks.
2. Check the installed module: perldoc perllocal
Manual module installation:
Code highlighting produced by Actipro
I found that I did not input or output the text. After one night, I finally understood it in the middle of the night:
Written in manual:
The tokenisation can be run as follows :~ /Mosesdecoder/scripts/tokenizer. Perl-l en ~
1. $ position =Index(String, substring, skipchars );
This function returns the position of the substring in the string. If the substring does not exist,-1 is returned. The skipchars parameter is an optional parameter, indicating the number of
1. System ("command ");Use this command to enable a sub-process to execute the command in quotation marks. The parent process will wait until the sub-process ends and continue to execute the following code.
2. Exec ("Command ");The effect is
We often use a program in Linux to add parameters. Now let's take a look at the functions related to control parameters in Perl. getopt. in Linux, there are two types of parameters. one is-help and the other is-H. that is, the difference between-and.
For the original English version, see http://www.masonbook.com /.
Introduction
Mason is a powerful template engine that can embed Perl into text. It provides many features to help you use reusable components to create dynamic web sites. In addition,
By default, \ n is often used as the line break.
When reading a sequence by row, it is based on a line break.
The content of the read strawberry1.gb file is as follows:LOCUS JX118024 460 bp DNA linear PLN 25-SEP-2012DEFINITION Fragaria vesca subsp.
1. Search for existing modulesHttp://search.cpan.org/
2. Input an XML query and select a module that has a high rating and can meet your needs:XML: SimpleUse warnings;Use XML: Simple;Use Data: Dumper;
# Converting XML files into Hash results
#! /Usr/bin/perluse Mail: Sender; # A new sender defines the encoding format to prevent garbled characters. my $ sender = new Mail: Sender {ctype => 'text/plain; charset = utf-8 ', encoding => 'utf-8', };# die "Error in mailing: $ Mail: Sender:
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