跳转至

详细信息地址 非root用户管理多个perl

Installation

curl -L [https://install.perlbrew.pl](https://install.perlbrew.pl/) | bash 如果下载失败,从这个地址下载https://raw.githubusercontent.com/gugod/App-perlbrew/master/perlbrew,直接保存为perlbrew即可.

chmod 757 perlbrew

添加到环境变量即可。

Initialize 初始化

perlbrew init

See what is available 查看有哪些版本的perl可以安装

perlbrew available

Install some Perls 安装一些perl

perlbrew install 5.32.1 perlbrew install perl-5.28.3 perlbrew install perl-5.33.6

See what were installed 查看已安装的perl

perlbrew list

Swith to an installation and set it as default

perlbrew switch perl-5.32.1

Temporarily use another version only in current shell.

perlbrew use [perl](https://metacpan.org/pod/perl)-5.28.3

perl -v

Turn it off and go back to the system perl.

perlbrew off`

Turn it back on with 'switch', or 'use'

perlbrew switch perl-5.32.1

perlbrew use [perl](https://metacpan.org/pod/perl)-5.32.1

Exec something with all perlbrew-ed perls

perlbrew exec -- perl -E 'say $]'

回到页面顶部