在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
perlbrew可以用源码方式安装perl的各种版本,可以容纳多个perl版本共存,并随意切换。 1、把perlbrew安装到home目录:
2、编辑home目录的.bashrc文件,添加perlbrew的可执行文件, if [ -f ~/perl5/perlbrew/etc/bashrc ]; then . ~/perl5/perlbrew/etc/bashrc fi 执行一下: source .bashrc 3、perlbrew的常用语法: # Initialize perlbrew init # See what is available perlbrew available # Install some Perls perlbrew install 5.18.2 perlbrew install perl-5.8.1 perlbrew install perl-5.19.9 # See what were installed perlbrew list # Swith to an installation and set it as default perlbrew switch perl-5.18.2 # Temporarily use another version only in current shell. perlbrew use perl-5.8.1 perl -v # Or turn it off completely. Useful when you messed up too deep. # Or want to go back to the system Perl. perlbrew off # Use 'switch' command to turn it back on. perlbrew switch perl-5.12.2 # Exec something with all perlbrew-ed perls perlbrew exec -- perl -E 'say $]'
|
请发表评论