How can I install a separate perl without disturbing the existing one?

32-bit, perl

Solution

Install the custom perl in a different directory, say `/opt/perl-5.10.1-32bit` and specify that path in the scripts which you want to use this custom version:

#!/opt/perl-5.10.1-32bit/perl

as the first line of your script.

For example, just a few minutes ago, I did:

$ ./configure -Dprefix=/opt/perl-5.11.0

Problem

How I should install 32-bit Perl on 64-bit machine without affecting the existing applications that uses 64-bit Perl? Is it possible to have a single application (Read: Single file) use different version of Perl for different tasks?

Original source