On Linux you can use
update-alternative to change the version of a command.
Which command in OS X (10.8) will switch the alternative of the current command?
I understand the motivation behind your question.
For example, in openSUSE
Unfortunately, and although some think it would be necessary, at least for MacPorts, there is no such thing in OS X. I have personally solved the lack of
or simply changing
If you can't solve it like this and are weighing the fact of porting it to OS X be aware that although
openSUSE 11.4 provides the Perl version as an RPM package. If you are looking for the C version, go for any recent Ubuntu or Debian release, or openSUSE 12.1 or later.
In stock OS X there is no more than one version of a command line program installed. In general they are quite outdated. If you like to install a newer version and switch to it, use a package manager like