Install perl in linux

Source: Internet
Author: User
Tags install perl
Install perl in linux-general Linux technology-Linux programming and kernel information. For details, refer to the following section. Both linux and perl are free software. It is amazing to combine them.
Follow these steps to install perl in linux.

1. Get the latest perl version. The current version is 5.6.0, that is, stable.tar.gz.

2. Solution package:
Gunzip stable.tar.gz
Tar xvf stable.tar
Get catalog perl-5.6.0

3. Install perl in the directory perl-5.6.0:
Rm-f config. sh Policy. sh
Sh Configure-de
Make
Make test
Make install
Config. sh Policy. sh is the configuration file of the previous installation.
Delete it.
Sh Configure-de is installed with the default configuration. Generally, it will be OK.
After installation, the directory where perl is located is/usr/local/lib/perl5, And the perl execution File
In/usr/local/bin.

4. About. html files
The. html file cannot be installed automatically when perl is installed, with one in the perl-5.6.0 directory
Installhtml files. Run perl installhtml -- help to get help.
Installhtml can compile the. pod and. pm files to obtain the corresponding. html file.
For more information, see.
The following is a program I wrote with similar functions.

Simple_find ("5.6.0"); # source directory containing. pm files
Use Pod: Html;
Sub simple_find {
$ Sourth = "/usr/local/lib/perl5/5.6.0html/"; # target directory containing. html
My ($ input) = @_;
My $ file;
$ Ddir = $ sourth. $ input;
$ Cont = 'file $ ddir ';
If ($ cont !~ /$ Ddir \: \ sdirectory /){
'Mkdir $ ddir ';
}
Opendir (md, $ input );
My @ file = readdir (md );
Closedir (md );

@ Pfile = grep (m/\. pm/, @ file );
My @ dfile = grep (! M/\. pm/, @ file );
@ Dfile = grep (! M/^ \./, @ dfile );

Foreach $ pfile (@ pfile ){
$ Pfile = ~ /\. Pm /;
$ Dfile = $ ';
$ Sfile = $ input. "/". $ pfile;
$ Dfile = $ sourth. $ input. "/". $ dfile. "\. html ";
Pod2html (
"-- Infile = $ sfile ",
"-- Outfile = $ dfile ");
}
Foreach $ file (@ dfile ){
$ Vale = $ input. "/". $ file;
$ Cont = 'file $ vale ';
If ($ cont = ~ /$ Vale \: \ sdirectory /){
Simple_find ($ vale );
}
}
}
Use the above program to obtain a target directory consistent with the source directory structure, including the corresponding. html file
.
Note: The above two methods will generate a row-class error that cannot be converted. In fact, it is irrelevant.
Can be ignored.

5. Module Installation
Gunzip Module.tar.gz
Tar xvf Moudle.tar
Go to the corresponding directory
Perl Makefile. PL
Make
Make test
Make install
After the installation is complete, the module is in the/usr/local/lib/perl5/site_perl directory. html
Files cannot be installed automatically. You need to install them using the method described earlier.
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.