The every day things from Thalamus' life.

Thalamus' Blog

28 April, 2012

Installing multiple versions of perl

Filed under: ComputerStuff_en — Thalamus @ 12:42

This is a note to myself on how to install perlbrew. Perlbrew makes it easy to have multiple versions of perl installed on one host – and even better. If something gets screwed up, you will not make problems with the globally installed perl of the OS.

The steps beneath is almost an exact copy of this great article :

$ cd ~
$ curl -LO
$ perl ~/perlbrew install
$ rm ~/perlbrew
$ ~/perl5/perlbrew/bin/perlbrew init

Execute what the init tells you to do, and add the following to your own .bashrc.

source ~/perl5/perlbrew/etc/bashrc

Now, setup your CPAN mirror.

$ perlbrew mirror

I picked ‘127’ – university of Bergen.

$ perlbrew -v install perl-5.14.2
$ perlbrew switch perl-5.14.2
$ curl -L | perl - App::cpanminus
$ cpan

Fill in the questions and once finished do a

$ o conf commit
$ q
$ cpanm --interactive -v App::cpanoutdated
$ cpan-outdated
$ cpanm --interactive -v App::CPAN::Fresh

From now on – write your perl scripts with

#!/bin/env perl

instead of


and install your modules with the use of cpanm

cpanm IPC::System::Simple
• • •