2

I'm tryng to instruct my system to permanently use perlbrew version of perl in my shells as per perlbrew documentation with:

perlbrew switch perl-5.26.0

which should use ~/perl5/perlbrew/perls/perl-5.26.0/bin/perl in every new open shell. But when I close and reopen iTerm2 and ask

perl -v

the answer is

This is perl 5, version 24, subversion 1 (v5.24.1) built for darwin-thread-multi-2level

which is system perl, in the path /usr/local/Cellar/perl/5.24.1/bin/perl

No chances to swith to different perl release other than current shell.

I have in my .bash_profile: source ~/perl5/perlbrew/etc/bashrc

as per perlbrew instructions

What am I missing to have permanently perl switched to desired version?

Thank you

Daniele
  • 83
  • 8

1 Answers1

0

Ok, after googling and struggling, I got to a solution at last. I started all it over again from Perlbrew documentation, and I did:

  1. perlbrew init
  2. Next, from what it replied to me, I added

source ~/perl5/perlbrew/etc/bashrc

to my .bash_profile file.

Now, at last, every new shell opens with desired perlbrew switched perl version.

Thank you all, hope this can be useful.

Daniele
  • 83
  • 8