in reply to Re: "Installed" Perl 5.34 , sort of
in thread "Installed" Perl 5.34 , sort of

just run the script; switch version; run the script again.

First of all, you should be using use (changes that shell only), not switch (changes all subsequently-created shells).

But you don't even need to use use.

"$PERLBREW_ROOT"/perls/5.34t/bin/perl ... "$PERLBREW_ROOT"/perls/5.32t/bin/perl ... "$PERLBREW_ROOT"/perls/5.30t/bin/perl ...

Update: Clarified which shells switch affects.

Replies are listed 'Best First'.
Re^3: "Installed" Perl 5.34 , sort of
by kcott (Archbishop) on May 19, 2022 at 01:50 UTC
    "... you should be using use (changes that shell only), ..."

    use is an option; not a requirement. Fix with: s/should be using/can also use/ (or similar).

    "... not switch (changes all shells)."

    That's incorrect. Fix with: s/changes all shells/changes subsequent shells/ (or similar). Below, I show starting two shells both using 5.34 — I change to 5.32 in the second shell; the first shell remains at 5.34; after that I start a third shell which uses 5.32.

    $ # Shell A $ perlbrew list * perl-5.34.0 perl-5.33.5 perl-5.32.0 perl-5.30.0 $ # perlbrew switch in Shell B $ perlbrew list * perl-5.34.0 perl-5.33.5 perl-5.32.0 perl-5.30.0
    $ # Shell B $ perlbrew list * perl-5.34.0 perl-5.33.5 perl-5.32.0 perl-5.30.0 $ perlbrew switch perl-5.32.0 $ perlbrew list perl-5.34.0 perl-5.33.5 * perl-5.32.0 perl-5.30.0
    $ # Shell C $ perlbrew list perl-5.34.0 perl-5.33.5 * perl-5.32.0 perl-5.30.0

    — Ken

      use is an option; not a requirement.

      Well yeah. And I was saying it's the one that should have been used here.

      Fix with: s/changes all shells/changes subsequent shells/ (or similar)

      Yeah, since .bashrc is only executed on startup. I'll clarify.