in reply to Re: installing perl 5.12.3
in thread installing perl 5.12.3

Unfortunately perlbrew is not recognised either

I have also amended my PATH but perl -v still shows 5.8.8!!

Replies are listed 'Best First'.
Re^3: installing perl 5.12.3
by moritz (Cardinal) on Apr 21, 2011 at 09:26 UTC
      PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/pats/bin:/home/pats/localperl/bin

      sorry that should read

      [root@Gandalf ~]# $PATH bash: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/ +bin:/usr/bin:/bin:/usr/X11R6/bin:/home/pats/bin:/home/pats/localperl/ +bin: No such file or directory

        If your system is anything like mine, there's a perl in /usr/bin/, which comes before /home/pats/localperl/bin.

        As I wrote before:

        You have to add $home/localperl/bin to your PATH environment variable before the path in which your current Perl is.

        (this time with emphasis).

Re^3: installing perl 5.12.3
by DrHyde (Prior) on Apr 21, 2011 at 09:29 UTC

    Make sure that the new perl comes before the old one in the path. Also, your shell may have cached the location of perl and so not "see" the old one even though the $PATH has changed.

    You can clear that cache with the hash command in bash, and you can see which perl executable comes first in the path with which perl.

      I have installed perlbrew and have being advised to

      Well-done! Congratulations! Please add the following line to the end of your ~/.bashrc

      can you tell me where I can edit my .bashrc file>

        Umm? It's telling you exactly which file to edit.
      [root@Gandalf ~]# hash hits command 2 /usr/bin/perl 1 /usr/bin/env [root@Gandalf ~]# [root@Gandalf ~]# [root@Gandalf ~]# [root@Gandalf ~]# [root@Gandalf ~]# [root@Gandalf ~]# [root@Gandalf ~]# [root@Gandalf ~]# which perl /usr/bin/perl [root@Gandalf ~]#