dilip
dilip

Reputation: 283

Compiling perl for AIX

I have a Perl script I wrote for Linux. Now I'd like run it on AIX and Solaris (each one separately). Will I have to compile them (I prefer not to provide my users the uncompiled script).

Do I necessarily need AIX or Solaris machines to compile them?

Upvotes: 0

Views: 534

Answers (1)

Sobrique
Sobrique

Reputation: 53498

If you have written your script such that it isn't using any platform specific features or commands, it should be fully portable. Refer to perlport for some more detail. Within Unix you're generally OK, but AIX is a bit of an odd Unix.

But in terms of compiling? Perl doesn't usually "compile" in the conventional sense. If you are compiling it into a binary executable, then this will be platform specific - you can occasionally 'get away' with a binary from Solaris/x86 running on Linux/x86, but it's better to assume not.

So yes, you will need to "compile" it on your specific architecture.

I would suggest that you don't actually need to though - perl is a scripting language, and script are plain text. Let their local installations of perl deal with the 'compiling' bit, and stop worrying about it. You honestly don't gain very much trying to compile perl anyway - at best it's an crude and trivial form of obfuscation.

Have a look at perlcompile to get a better understanding of this process.

Upvotes: 5

Related Questions