In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the steps of installing perl programming language under CentOS". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the steps of installing perl programming language under CentOS.
Perl was originally designed by Larry Wall (Larry Wall), who released it on December 18, 1987.
Perl borrows features from C, sed, awk, shell scripting, and many other programming languages. One of the most important features is its internal integration of regular expressions and the huge third-party code base CPAN. In short, Perl is as powerful as C and as convenient as scripting languages such as awk and sed. It is called "a fantasy scripting language with various language functions" and "the trump card tool in Unix".
Perl is commonly referred to as the "practical report extraction language" (Practical Extraction and Report Language), and you may also see "perl", all of which are lowercase. In general, "Perl", with uppercase P, refers to the language itself, while "perl", lowercase p, refers to the interpreter on which the program runs.
Perl official website: https://www.perl.org
Perl source code: http://www.cpan.org/src/5.0/
Perlbrew: http://perlbrew.pl
Perl source code installation
The code is as follows:
Wget http://www.cpan.org/src/5.0/perl-5.20.1.tar.gz
Tar-xzf perl-5.20.1.tar.gz
Cd perl-5.20.1
. / Configure-des-Dprefix=$HOME/localperl
Make
Make test
Make install
You need to install make and gcc before installing perl
The code is as follows:
Yum install gcc make
For perl upgrade installation, see "perlbrew installation perl" below.
--
Perlbrew installation
The code is as follows:
[root@ithomer ~] # yum install perlbrew
[root@ithomer ~] # perlbrew version
/ usr/bin/perlbrew-App::perlbrew/0.28
Cpan install perlbrew
The code is as follows:
Sudo yum install cpan
Sudo cpan App::perlbrew
Perlbrew init
Perlbrew version
Perlbrew initialization
The code is as follows:
[root@ithomer ~] # perlbrew init
Perlbrew environment initiated, required directories are created under
~ / perl5/perlbrew
Paste the following line (s) to the end of your / .bashrc and start a
New shell, perlbrew should be up and fully functional from there:
Source ~ / perl5/perlbrew/etc/bashrc
For further instructions, simply run `perlbrew` to see the help message.
Enjoy perlbrew at $homemade!
According to the above prompts, copy source ~ / perl5/perlbrew/etc/bashrc and paste it into the last line of ~ / .bashrc file and save it.
Perlbrew install perl
The code is as follows:
[root@ithomer ~] # perlbrew list
* / usr/bin/perl (5.10.1)
[root@ithomer ~] # perlbrew available
Perl-5.21.6
Perl-5.20.1
Perl-5.18.4
Perl-5.16.3
Perl-5.14.4
Perl-5.12.5
Perl-5.10.1
Perl-5.8.9
Perl-5.6.2
Perl5.005_04
Perl5.004_05
Perl5.003_07
[root@ithomer ~] # perlbrew install perl-5.20.1
Fetching perl-5.20.1 as / root/perl5/perlbrew/dists/perl-5.20.1.tar.gz
[root@ithomer ~] # perlbrew switch perl-5.20.1
[root@ithomer ~] # perlbrew list
* perl-5.20.1
/ usr/bin/perl (5.10.1)
[root@ithomer] # perl-v
This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-linux
Copyright 1987-2014, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
This system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
[root@ithomer ~] # perlbrew off
Fetching perl-5.20.1 as / root/perl5/perlbrew/dists/perl-5.20.1.tar.gz
[root@ithomer ~] # which perl
/ root/perl5/perlbrew/perls/perl-5.20.1/bin/perl
Description:
The code is as follows:
# Install installs the specified version of perl with perlbrew and downloads directory / root/perl5/perlbrew/dists/perl-5.20.1.tar.gz by default
Perlbrew install 5.20.1
Perlbrew install perl-5.20.1
# List installed versions lists the installed versions of perl
Perlbrew list
# Use a particular version uses perlbrew to select a specific perl version
Perlbrew switch perl-5.20.1
Perl-v
# do not use perlbrew for the time being, you can turn it off. Switching the perl version will fail after it is closed, so do not switch it.
Perlbrew off
--
Cpan installation
The code is as follows:
[root@ithomer ~] # yum install cpan
[root@ithomer] # cpan-v
/ usr/bin/cpan script version 1.9, CPAN.pm version 1.9402
Cpan installation Module (Test::More)
The code is as follows:
Cpan Test::More
At this point, I believe you have a deeper understanding of the "steps to install the perl programming language under CentOS". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.