How to install Perl scripting language under Linux operating system

  
                  

Both Linux and Perl are free software, and it's wonderful to combine the two.


Follow the steps below to install perl, perl can sing under linux.


1 Get the latest version of perl, the current version is 5.6.0, which is stable.tar.gz.


2 Solution package:

gunzip stable.tar.gztar xvf stable

Get the directory perl-5.6.0


3 Install perl in the directory perl-5.6.0:

rm -f config.sh Policy.shsh Configure -demakemake testmake install
config.sh Policy.sh for previous installation The configuration file for the new installation or upgrade installation needs to be removed. The sh Configure -de installation uses the default configuration and will generally be ok. After the installation is complete, the directory where perl is located is /usr/local/lib/perl5, and the perl executable file is in /usr/local/bin. 4 About .html files When installing perl, you cannot automatically install .html files. There is an installhtml file in the perl-5.6.0 directory. You can use perl installhtml --help to get help. Use installhtml to compile .pod and .pm files. Get the corresponding .html file, please see it for your specific use. Below is a program I have written that has 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/"; #含.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("--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 get a target directory that is consistent with the source directory structure, including the corresponding .html file. Note: Using the above two methods will produce a class error that cannot be converted. In fact, it has nothing to do with the big picture and can be ignored. 5 Module installation 
gunzip Module.tar.gztar xvf Moudle.tar Go to the corresponding directory 
perl Makefile.PLmakemake testmake install After the installation is complete, the module is in the /usr/local/lib/perl5/site_perl directory, .html file Can not be installed automatically, you need to use the method described above to install. 

Copyright © Windows knowledge All Rights Reserved