in reply to Re^3: Perlbrew installing perl failed
in thread Perlbrew installing perl failed

To change from one version of perl to another, you generally just need to modify $PATH.
And if you forget to reset $PATH to its original value, it is likely you have just messed up the link to your system Perl which can cause all kind of weird problems down the road.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Replies are listed 'Best First'.
Re^5: Perlbrew installing perl failed
by syphilis (Archbishop) on May 18, 2015 at 13:49 UTC
    There's no need to restore $PATH to its original value - unless I've been so insane as to make persistent (so-called "permanent") modifications to it.
    And I'm not that insane.
    I have never messed up the link to my system perl.

    My mind boggles at how feeble-minded I would have to be in order to suffer the consequences you describe.

    Cheers,
    Rob
      Interesting.

      So you change $PATH and then run your "other" Perl. Will the $PATH automagically reset once your "other Perl" script starts or finishes? What if meanwhile some other (automatic) script wants to start Perl?

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics

        Hi CountZero

        Um, $PATH is a variable, unless you write it down it only affects the current shell instance (works same for windows and %PATH%/cmd.exe )

        Child processes get a copy of parents $PATH/%ENV

        "automatic" scripts aren't spawned from existing shell instances... they often aren't spawned with %ENV initialized from .profile at all ( sourcing a shell script/.profile and importing into %ENV )