Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: "Strawberry Perl" - can it live together with ActivePerl 5.10.0 Build 1003 (on WinXP)?

by syphilis (Archbishop)
on Aug 24, 2008 at 09:37 UTC ( [id://706521]=note: print w/replies, xml ) Need Help??


in reply to "Strawberry Perl" - can it live together with ActivePerl 5.10.0 Build 1003 (on WinXP)?

Yes, you can have as many different perls as you want on the one machine without having any interference problems - so long as you install them to separate locations and, while installing them, you don't let any of them alter the system path. (If they do add their own location to the system path during installation, then it's no big deal - you just undo those changes as soon as the installation has completed.)

Then it's just a matter of setting the system path variable to find whichever perl you want to use. For me, that means that for Strawberry Perl I run:
set PATH=C:\strawberry\perl\bin;%PATH%
If I want to run ActivePerl build 1003:
set PATH=C:\ap1003\bin;%PATH%
And for ActivePerl build 822:
set PATH=C:\ap822\bin;%PATH%
Rather than remembering where all of these different perls are installed, it's easier to put those commands in separate batch files, and then just run the appropriate batch file for whichever perl you want. For example, if I want to use ActivePerl build I just run ap822.bat which sets the path (and any other environment variables I might want set) appropriately for me.

Can I define for a script which Perl to use?

I don't think so (if I understand the question correctly). Any time "perl" is invoked, it will be the first "perl" executable to be found that will be run. You can, of course, always call a specific perl executable by quoting the full path to it - eg C:\strawberry\perl\bin\perl script.pl will always run C:\strawberry\perl\bin\perl.exe no matter which "perl" (if any) comes first in the path environment variable.

Cheers,
Rob
  • Comment on Re: "Strawberry Perl" - can it live together with ActivePerl 5.10.0 Build 1003 (on WinXP)?
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: "Strawberry Perl" - can it live together with ActivePerl 5.10.0 Build 1003 (on WinXP)?
by binf-jw (Monk) on Aug 24, 2008 at 10:04 UTC
      You'd have to use set every time you open a new terminal

      Effectively, yes. But it's much simpler to just enter ap1003 and have ap1003.bat "set" the environment as you want.

      Cheers,
      Rob
      or call it from autoexec.bat, and reboot :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://706521]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-23 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found