Are there Unix platforms where Perl is not installed by default?

You can get a version of Perl compiled for just about any unix variant. Perl doesn't have to be 'installed', but can run inside of your application's directory. I would bundle Perl with my distribution, so you can ensure you're running the same version.

It is very difficult to write a completely cross platform shell script, without testing on the target OS. If you develop an awk script, you are probably going to develop using the GNU variant on Linux, which is a superset of the POSIX awk. I'm often configuring opening source packages on Solaris, and I'm constantly finding issues where people assume your running a modern version of a tool. For example, on Solaris bash is not the standard bourne shell (/bin/sh), and echo does not take any parameters. If you do try to code with POSIX awk, you may find yourself limited by the regex library, or out dated conventions.

Perl's artistic license allows you to bundle it with your program, as long as you follow a couple of simple things like keeping the copyright in tact.


If the client does not have Perl on their machines you can always use Par::Packer to create an executable for that platform. This also means that you don't have to worry about using modules, since they will be included in the executable as well.


Almost every *nix (except some for very limited disk space) has Perl installed. AFAIK, even FreeBSD. Just in case it isn't, you can transform Perl program into an executable that will not need perl with PAR::Packer.

Tags:

Linux

Unix

Perl

Awk