In PERL development, system commands can usually be executed using the systems function or the ' operator ', but pay attention to alias, BG, bind, break, Builtin, CD, command, Compgen, complete, continue, Declare, dirs, Disown, Echo, enable, Eval,
Index1. Statistics of the length of Fasta, FA and FASTQ files, the number of reads in the statistics FASTQ, the individual reads length, the total length of reads, and the number of Fasta in the statistics Contig file, listing the name, the length
[root@localhost mha4mysql-node-0.52]# perl makefile.pl;make;make Install Can ' t locate extutils/makemaker.pm in @INC (@INC contains:inc/usr/local/lib64/perl5/usr/local/share/perl5/usr/lib64/
You can decide if make the output shown on command screens by using 2>&1 or NULTesting script:print "without null \ n";System ("dir 2>&1");print "with null \ n";System ("dir > NUL");print "End \ n";Result:C:\rebecca\script\perl\unicode>perl
#!/usr/bin/perl-w UseStrict; UseFile::Spec;Local$\ ="\ n";#each line of output of the current module adds a newline charactermy %options;#directory path$options{Single_case} ='/home/jiangyu/src/pl/example'; my @cases; if(-D$options{single_case})
First, the definitionA subroutine is a separate piece of code that performs a special task, which can reduce duplication of code and make the program easier to read. In Perl, subroutines can appear anywhere in the program. The definition method
Recently, when running in a local environment using Perl, I need to enter a device name to determine the next step. Every time I run it here, I enter a long device name manually, for example, ciscocontenteng. Every time I input such a name, it is
Add the methods summarized yesterday to query which Perl modules have been installed locally. You can use either of the following methods:
Run the following statement in shell:
$ Perl-msmart: comments-El
If an error similar to the following is
1. Change the Directory
Chdir "/etc" or die "can't chdir to '/etc '! \ N ";
If the parameter is omitted, the system returns to the user's home directory, which is the same as that of CD;
2. wildcard file name
My @ all_files = glob "*"; # files
A Perl script was written a few days ago :? Operator encountered a very strange problem
$ Data-> {$ id}-> {'Total '}?$ Data-> {$ id}-> {'ratio '} = sprintf ("%. 2f % ", 100 * $ data-> {$ id}-> {'succ'}/$ data-> {$ id}-> {'Total '}):$ Data-> {$ id}->
Here I'll summarize three ways to open a temporary file using Perl.
The first wayIs to create the new object via module IO: file to get a read/write file handle as below.
My $ temp_fh = IO: file-> new_tmpfile;
Perl closes these files when the scalar
Code idea: Construct a tree based on the given two traversal sequences, and then traverse the remaining traversal.
Root traversal + root Traversal
#! /Usr/bin/perl-W use strict; Use List: util QW (first); Use 5.010; my @ tree;
Reprinted this site article, please note, Reprinted from:
FukaiHttp://www.php-oa.com
Link to this article:
Http://www.php-oa.com/2009/04/04/perl_getopt-long.html
In Linux, we often use a program that requires adding parameters. Now let's take a look
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
This article only implements compilation, and calling WCF is not successful yet (the server digital certificate is called without authentication !)
1: Install ActivePerl (latest ActivePerl-5.12.2.1203)
Http://www.activestate.com/activeperl/downloads/
In Perl, you can use the open or sysopen functions to open files and perform operations. Both functions use a file handle (that is, a file pointer) to read and write files.
The open function is used as an example:
1. Open and Close files
The return
This task counts the top 500 entries in a week.
Data source: from the Oracle database.
Requirement: generate an Excel file and send an email to the relevant person.
Because it was the first time that I was engaged in such a task (writing scripts on
Originally published on Netease blog 13:39:42
The exercise in chapter 5th of learning Perl is somewhat unexpected. Although Chapter 5th describes basic input and output, it takes me some time to review the exercises in the previous chapters. Oh, I
The normal subscript operations in the perl array must be familiar to everyone. I will not describe them here.This article describes the multi-digit values under the perl array, which greatly facilitates Array Operations.Note: These numbers are from
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