Both Linux and perl are free software. it is amazing to combine them. you can install perl by following these steps, and perl will be able to sing in linux. 1. get the latest version
Both Linux and perl are free software. it is amazing to combine them. you can install perl by following these steps, and perl will be able to sing in linux.
1. obtain the latest perl version. The current version is 5.6.0, that is, stable.tar.gz.
2. unpack the 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 install and use 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、about .html files
The. html file cannot be installed automatically when perl is installed, there is an installhtml file in the perl-5.6.0 Directory, run perl installhtml -- help to get help, use
Installhtml can compile the. pod and. pm files to obtain the corresponding. html file. for details about its usage, see. Below is a program with similar functions.
- Simple_find ("5.6.0"); # contains. use Pod: Html; sub simple_find {$ sourth = "/usr/local/lib/perl5/5.6.0html/"; # contain. the target html 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 (" -- 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 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.