HPWD
HPWD

Reputation: 2240

Perl compatibility

This isn't my area of expertise so I'm asking hopefully the right question.

We have a server that is lease rolling. The old server is a 32-bit windows server and the new server is 64-bit windows 2008 R2 SP1.

One of the web applications uses Perl to run some scripts.

  1. We can run the same 32bit version on the new 64-bit machine? (e.g. if there is a same version but one is 32-bit and one is 64-bit, are they essentially the same?)
  2. If a script is working on a 32-bit version, should it still work under the 64-bit version of Perl?

If the questions need clarifying, please let me know and I'll see about asking the appropriate person on our team.

Upvotes: 2

Views: 2299

Answers (3)

cHao
cHao

Reputation: 86524

If you're concerned about compatibility, you should be able to run the 32-bit version of perl on the 64-bit machine (assuming both are x86). But the 64-bit version should work more or less the same as the 32-bit one, with a couple of exceptions that should not affect scripts. (They have to do with C/XS code in modules, mostly. Binary-compatibility stuff. Meaning modules will have to be built for 64-bit. Fortunately, any Perl interpreter that doesn't suck will do the build stuff for you in the case of *nix, or provide a package manager that has pre-built modules like ActiveState does.)

Upvotes: 2

daxim
daxim

Reputation: 39158

  1. Yes, you can, as long as you redeploy properly, including the build steps for dependencies. Just copying files over will only work if the whole application stack is pure-Perl, which is not likely. — Yes, they are essentially the same, but binary incompatible.
  2. Likely yes. Problems can arise with the dependencies, however the number of modules that fail due to 32-bit/64-bit differences are miniscule.

Upvotes: 2

Marius Kjeldahl
Marius Kjeldahl

Reputation: 6824

I think the answers to both your questions are yes. The 32-bit applications should run fine on your 64-bit Windows, but will not be able to utilize any of the 64-bit features (where a larger usable address space may very well be the most important if you ever want to parse big XML using XML::Twig ;-).

The script running under 32-bit perl will work on a 64-bit perl, provided you get all the modules for the 64-bit perl in order, since they typically run from different directories. Also, be aware that for 64-bit perl on Windows you probably need Strawberry perl, ActiveState perl or similar. Cygwin is only 32-bit as far as I know.

Upvotes: 2

Related Questions