I use the ZIP file to install and just UNZIP into a directory - C:\Program Files\strawberry\strawberry_5.MJ.MN-MSWin32-x64-multithread.

The MJ and MN are the major, minor version numbers. This way I have all versions of Perl in one place and then use 'mklink' in a fancy script (see below) to map C:\strawberry to the version I want to use. It's basically PerlBrew for Strawberry on Windows.

By doing it this way, I never have to change my PATH, which just includes:

C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawrry\perl\bin;

Batch script for changing Perl versions 'plroot.bat':

@echo off setlocal ENABLEDELAYEDEXPANSION set PLPERL=strawberry set PLROOT=%SystemDrive%\!PLPERL! set PLUSER=%USERPROFILE%\perl set PLSTOR=%ProgramFiles%\!PLPERL! REM set PLSTOR=%SystemDrive% REM REM Help REM if {%1}=={/?} goto HELP if {%1}=={--help} goto HELP REM REM Check args REM if not {%2}=={} goto ERROR REM ------------------------------------------------------- perl -v 2>nul>nul if ERRORLEVEL 9009 goto ERROR_INSTALL :NORMAL if {%1}=={} ( dir /al !PLROOT!* 2>nul | find "JUNCTION" > nul if ERRORLEVEL 1 goto INSTALL for /f "tokens=5,*" %%i in ('dir /al !PLROOT!* ^| find "JUNCTION"' +) do @echo !PLROOT! %%j for /f "tokens=5,*" %%i in ('dir /al !PLUSER!* ^| find "JUNCTION"' +) do @echo !PLUSER! %%j echo. perl -e "print \"$] \@ $^^X\n\"" echo. echo Available: for /f "tokens=1,* delims=_" %%i in ('dir /b "!PLSTOR!\!PLPERL!_*" +') do @if exist "!PLSTOR!\!PLPERL!_%%j\perl\bin\perl.exe" echo %% +j ) else ( if exist "!PLSTOR!\!PLPERL!_%1\perl\bin\perl.exe" ( if exist !PLROOT! rmdir !PLROOT! mklink /j !PLROOT! "!PLSTOR!\!PLPERL!_%1" if not exist %userprofile%\perl5\%1 ( mkdir %userprofile%\perl5\%1 ) rmdir !PLUSER! mklink /j !PLUSER! !userprofile!\perl5\%1 echo. perl -e "print \"$] \@ $^^X\n\"" ) else goto ERROR ) goto END :INSTALL echo Installing... pause if not exist %PLROOT% goto ERROR_NOTFOUND for /f %%i in ('perl -MConfig -e "print \"$Config{version}-$Config{arc +hname}\""') do set PERLJUNCDIR=%%i if not exist "%PLSTOR%" mkdir "%PLSTOR%" move %PLROOT% "%PLSTOR%\%PLPERL%_%PERLJUNCDIR%" call :NORMAL %PERLJUNCDIR% goto END REM ------------------------------------------------------- :ERROR echo %0: Parameter format not correct goto END :ERROR_INSTALL echo %0: Perl not installed goto END :ERROR_NOTFOUND echo %0: Perl not found goto END :HELP echo. echo %0 manages different versions of Perl. echo. echo USAGE: echo. echo %0 ^<Perl_version_number^> echo. echo Where ^<Perl_version_number^> is one of the following: echo. for /f "tokens=1,* delims=_" %%i in ('dir /b "!PLSTOR!\!PLPERL!_*"') d +o @if exist "!PLSTOR!\!PLPERL!_%%j\perl\bin\perl.exe" echo %%j echo. :END

In reply to Re: Strawberry Perl, from 5.18 to 5.22 by VinsWorldcom
in thread Strawberry Perl, from 5.18 to 5.22 by EigenFunctions

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.