Newbie PATH command question...

Still trying to pick up speed on the command line in OSX.

I have installed Apache, and some other server software, but am having problems getting my install of Perl to work. I feel like it's because my Apache install is looking for the base (built-in) Perl that came with OSX which is 5.10.

I have installed the latest version of Perl with MacPorts into another directory:

/opt/local/bin/perl5.16

How do I use the PATH command to make sure it always gets called? I never want to use the 5.10 version in OSX, only my installed version. And while I'm at it, is there a good beginner's explanation of PATH and what it's for and how it's used?

Ethon

Use MacPorts and install mod_perl. This should build the module with perl5.16 for Apache. Permanently disabling the OS distribution is not a good idea. What shell are you using?

Unfortunately the current macports mod_perl2 installs perl5.12 which is not the latest version.

Ethon

---------- Post updated at 02:13 PM ---------- Previous update was at 01:27 PM ----------

Sorry, bin/bash is shell.

Ethon

It seems like there should be a way to tell any script to use the most recent version of Perl.

For instance, I notice that most software declares /usr/bin/perl as the home for perl. I simply need this to be /opt/local/bin/perl.

I don't know how to do this.

I vaguely recall you can put the /opt/local/bin first in your $PATH and it "should" find it there and run it.

An alternative might be to rename the /usr/bin/perl executible (perl.apple ?) and create a sim link called perl in /usr/bin/ pointing to /opt/local/bin/perl

The $PATH is the safest, presuming it works, of course.