Q: I now have an HTML page code that wants to change it to a Perl program if simply add "#!.. in its first line /perl/bin/perl ", and change the file suffix name to. CGI, the error prompts" you don t have permission to access/test/index.cgi on the
To be honest, this thing is a bit of a toss of people, mainly in the book's statement is very obscure, in fact, it is not difficult to understand.Our, "Limit your name to a certain scope," in fact, it is explicitly declared a "global variable",
1. When chomp without parameters, the default parameters are used and the $_ operation is done.
2. Array @array ... Available $array[number] references. $ #array. Represents the number of indexes in an array.
3. $! contains error messages;
4. The
1. Remove duplicate elements from an array:
Using the GREP function code fragment:Code:
Copy Code code as follows:
My @array = (' A ', ' B ', ' C ', ' a ', ' d ', 1, 2, 5, 1, 5);
My%count;
My @uniq_times = grep {+ + $count {$_}
For business needs, to query the customer's IP address, will be part of the region's customers filtered out, began to think of the use of IP database, found that the difficulty of reading the pure database for me some of the big, and my current time
Method one (not using modules, by Agonyr)
Copy Code code as follows:
#!/usr/bin/perl-w
Use strict;
My @seq = ("A", "T", "C", "G");
my $length = 10000;
undef my%hash;
$hash {"A"} = Int ($length * 0.3);
$hash {"
Initially intended to use Perldoc to look at the Apache2::request module, the results of the following error occurred at run time:
Copy Code code as follows:
Error in Tempfile () using/tmp/xxxxxxxxxx:parent directory (./) is
Not
My first Perl script for the production environment, though not very good, has taken a solid step:)Leaders have tasks, to a number of IP list, ping each machine, if there is no response to send an email notification, the message needs to separate,
A conversion program that simply converts a A in the DNA sequence to T, the first of which does not use a private variable.
Copy Code code as follows:
#!/bin/perl
#下面是一段DNA序列
$DNA =attatatat; #这里是我们的序列
$result =a_to_t ($DNA);
window to read a file in the following format:Open (Filehand, "path E.g:d:\\data.txt");
The open content is then assigned to a variable:$protein =;
Attached: A program for reading protein sequences.
Copy Code code as follows:
1, Time function: Returns the cumulative number of seconds from January 1, 1970Use: My $t =time ();2. localtime function: Get local time zoneUse: My $t =localtime (Time ());3. gmtime function: Get GMTUse: My $t =gmtime (Time ());Get the format time (
1. Find existing Moduleshttp://search.cpan.org/
2. Input XML query, select the higher evaluation, and can meet their own needs of modules:Xml::simpleUse warnings;Use Xml::simple;Use Data::D umper;
#将XML文件转化为Hash结果
Copy Code code as follows:
However, the common gadget of the Linux system is inherently friendly to the columns, sometimes invoking awk directly in Perl is more convenient and efficient than writing the corresponding Perl script. For example, insert the AWK statement with
Copy Code code as follows:
#!/usr/bin/perl
#
# using grep map to get the intersection and set of two lists, the complement
#
Use strict;
My @a= ("a", "B", "C", "D", "E");
My @b= ("B", "G", "F", "E");
Print "List a data: @a \ n";
print
asp.net|perl| Access | data | Databases asp.net/perl.net database access Example
One of the features of the. NET Framework is it ability to handle multiple languages. Third party compiler vendors can create and implement a compiler targeted for the.
XAMPP for Mac OS X is the simplest, most practical, and most complete network server solution on Mac OS X. This release includes the latest MySQL, PHP (4+5), and Perl Apache 2 servers. It is published as a MAC OS X installation package, containing
The Perl installation steps on the Unix/linux system are as follows:
Open http://www.perl.org/get.html through the browser.
Download the source package for Unix/linux.
After you download the perl-5.x.y.tar.gz file, perform the
Every time you learn a piece of software, you need to pack a bunch of things, and there are requirements for Perl or Pyhton versions. Feel the time spent on software maintenance is very long, if there is a super computer, each company to apply for a
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