Install the Perl script language in Linux

Source: Internet
Author: User
Tags install perl perl script
Install the Perl script language-general Linux technology-Linux programming and kernel information in Linux. For more information, see the following. Both linux and perl are free software. It is amazing to combine them.
  
Follow these steps to install perl in linux.
  
   1. obtain 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 under 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 used during previous installation. You need to delete it during new installation or upgrade installation.
Sh Configure-de is installed with the default configuration. Generally, it will be OK.
After installation, the Directory of perl is/usr/local/lib/perl5, And the perl execution file is in/usr/local/bin.
  
   4. html file
Perl cannot be installed automatically. html file, there is an installhtml file in the perl-5.6.0 directory, execute perl installhtml -- help to get help, you can use installhtml. pod and. the pm file is compiled accordingly. html file. For details about how to use it, 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 and 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. The. html file cannot be installed automatically. You need to install it using the method described above.
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.