Install Perl under Linux system

zhaozj2021-02-08  261

LINUX and Perl are free software, and the combination of the two is really unpredictable.

Follow these steps to usually install Perl, Perl can sing under Linux.

1. Get the latest version of Perl, the current version is 5.6.0, namely stable.tar.gz.

2. Solution package:

Gunzip stable.tar.gz

TAR XVF Stable.tar

Get the catalog Perl-5.6.0

3. Install Perl under the directory Perl-5.6.0:

Rm -f config.sh policy.sh

Sh Circigure -de

Make

Make test

Make Install

Config.sh policy.sh is the configuration file, new installation or upgrade installation at the previous installation.

Need to delete it.

SH Configure -de installation uses the default configuration, generally OK.

After the installation is complete, the directory of Perl is / usr / local / lib / perl5, perl execution file

In / usr / local / bin.

4. About .html file

You cannot install the .html file automatically when installing Perl, has one in the Perl-5.6.0 directory

INSTALLHTML file, perform Perl InstallHTML - HELP to get help, use

InstallHTML can compile .html file files, its set of .html file files

Please see yourself in your use.

Below is a program that I have written.

Simple_find ("5.6.0"); # contains the source directory of the .pm file

Use Pod :: HTML;

SUB Simple_Find {

$ sourth = "/ usr / local / lib / perl5 / 5.6.0html /"; # 含 .html target directory

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

"- IFILE = $ sfile",

"--outfile = $ dfile");

}

Foreach $ file (@dfile) {

$ VALE = $ INPUT. "/". $ file;

$ Cont = `File $ VALE`;

IF ($ Cont = ~ / $ VALE /: / SDIRECTORY /) {

SIMPLE_FIND ($ VALE);

}

}

}

Use the above program to get a target directory consistent with the source directory structure, including the corresponding. Html

Part.

Note: Use the above two methods will not be converted to a row of rows, in fact, it has nothing to do, it 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 completed, the module is in the / usr / local / lib / perl5 / site_perl directory,. HTML

The file cannot be installed automatically, and you need to install the previous introduction method.

2000.6.6 PSZ

转载请注明原文地址:https://www.9cbs.com/read-1342.html

New Post(0)