OSX 10.10 select perl 5.16 instead of 5.18
I find that my OSX 10.10 comes with perl 5.16 and 5.18. By default, when I run perl, I am using perl 5.18. Is there way for me to run perl 5.16 when I run perl command?
admins-Mac-mini:~ bufferoverflow76$ ls -l /usr/bin/perl*
-rwxr-xr-x 1 root wheel 58416 Sep 10 10:06 /usr/bin/perl
-rwxr-xr-x 1 root wheel 35600 Sep 10 10:06 /usr/bin/perl5.16
-rwxr-xr-x 1 root wheel 35600 Sep 10 10:06 /usr/bin/perl5.18
admins-Mac-mini:~ bufferoverflow76$ perl -version
This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for mor
command-line perl osx-yosemite
add a comment |
I find that my OSX 10.10 comes with perl 5.16 and 5.18. By default, when I run perl, I am using perl 5.18. Is there way for me to run perl 5.16 when I run perl command?
admins-Mac-mini:~ bufferoverflow76$ ls -l /usr/bin/perl*
-rwxr-xr-x 1 root wheel 58416 Sep 10 10:06 /usr/bin/perl
-rwxr-xr-x 1 root wheel 35600 Sep 10 10:06 /usr/bin/perl5.16
-rwxr-xr-x 1 root wheel 35600 Sep 10 10:06 /usr/bin/perl5.18
admins-Mac-mini:~ bufferoverflow76$ perl -version
This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for mor
command-line perl osx-yosemite
add a comment |
I find that my OSX 10.10 comes with perl 5.16 and 5.18. By default, when I run perl, I am using perl 5.18. Is there way for me to run perl 5.16 when I run perl command?
admins-Mac-mini:~ bufferoverflow76$ ls -l /usr/bin/perl*
-rwxr-xr-x 1 root wheel 58416 Sep 10 10:06 /usr/bin/perl
-rwxr-xr-x 1 root wheel 35600 Sep 10 10:06 /usr/bin/perl5.16
-rwxr-xr-x 1 root wheel 35600 Sep 10 10:06 /usr/bin/perl5.18
admins-Mac-mini:~ bufferoverflow76$ perl -version
This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for mor
command-line perl osx-yosemite
I find that my OSX 10.10 comes with perl 5.16 and 5.18. By default, when I run perl, I am using perl 5.18. Is there way for me to run perl 5.16 when I run perl command?
admins-Mac-mini:~ bufferoverflow76$ ls -l /usr/bin/perl*
-rwxr-xr-x 1 root wheel 58416 Sep 10 10:06 /usr/bin/perl
-rwxr-xr-x 1 root wheel 35600 Sep 10 10:06 /usr/bin/perl5.16
-rwxr-xr-x 1 root wheel 35600 Sep 10 10:06 /usr/bin/perl5.18
admins-Mac-mini:~ bufferoverflow76$ perl -version
This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for mor
command-line perl osx-yosemite
command-line perl osx-yosemite
asked Jan 22 '15 at 9:21
bufferoverflow76bufferoverflow76
62
62
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
If you want to avoid mucking with the base system, you could add an alias to your environment. For example, in your ~/.bashrc
:
alias perl="/usr/bin/perl5.16"
Or add a symlink to /usr/bin/perl5.16
in your $PATH
, which may be preferable. For example
ln -s /usr/bin/perl5.16 ~/bin/perl
Then in your ~/.bashrc
, add:
export PATH=~/bin:$PATH
This won't address scripts that have a shebang line pointing directly to /usr/bin/perl
, however.
For more sophisticated and convenient management of multiple Perl installs, consider using Perlbrew.
add a comment |
You should be able to do this with either of the following commands:
defaults write com.apple.versioner.perl Version -string 5.16
or
export VERSIONER_PERL_VERSION=5.16
(I can't test this at the member as my Mac only has one version of Perl installed at the moment.)
Sources: http://krypted.com/mac-os-x/perl-control/ and https://gist.github.com/crankycoder/1389144
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f867929%2fosx-10-10-select-perl-5-16-instead-of-5-18%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you want to avoid mucking with the base system, you could add an alias to your environment. For example, in your ~/.bashrc
:
alias perl="/usr/bin/perl5.16"
Or add a symlink to /usr/bin/perl5.16
in your $PATH
, which may be preferable. For example
ln -s /usr/bin/perl5.16 ~/bin/perl
Then in your ~/.bashrc
, add:
export PATH=~/bin:$PATH
This won't address scripts that have a shebang line pointing directly to /usr/bin/perl
, however.
For more sophisticated and convenient management of multiple Perl installs, consider using Perlbrew.
add a comment |
If you want to avoid mucking with the base system, you could add an alias to your environment. For example, in your ~/.bashrc
:
alias perl="/usr/bin/perl5.16"
Or add a symlink to /usr/bin/perl5.16
in your $PATH
, which may be preferable. For example
ln -s /usr/bin/perl5.16 ~/bin/perl
Then in your ~/.bashrc
, add:
export PATH=~/bin:$PATH
This won't address scripts that have a shebang line pointing directly to /usr/bin/perl
, however.
For more sophisticated and convenient management of multiple Perl installs, consider using Perlbrew.
add a comment |
If you want to avoid mucking with the base system, you could add an alias to your environment. For example, in your ~/.bashrc
:
alias perl="/usr/bin/perl5.16"
Or add a symlink to /usr/bin/perl5.16
in your $PATH
, which may be preferable. For example
ln -s /usr/bin/perl5.16 ~/bin/perl
Then in your ~/.bashrc
, add:
export PATH=~/bin:$PATH
This won't address scripts that have a shebang line pointing directly to /usr/bin/perl
, however.
For more sophisticated and convenient management of multiple Perl installs, consider using Perlbrew.
If you want to avoid mucking with the base system, you could add an alias to your environment. For example, in your ~/.bashrc
:
alias perl="/usr/bin/perl5.16"
Or add a symlink to /usr/bin/perl5.16
in your $PATH
, which may be preferable. For example
ln -s /usr/bin/perl5.16 ~/bin/perl
Then in your ~/.bashrc
, add:
export PATH=~/bin:$PATH
This won't address scripts that have a shebang line pointing directly to /usr/bin/perl
, however.
For more sophisticated and convenient management of multiple Perl installs, consider using Perlbrew.
answered Feb 17 '15 at 3:19
zacksezackse
51237
51237
add a comment |
add a comment |
You should be able to do this with either of the following commands:
defaults write com.apple.versioner.perl Version -string 5.16
or
export VERSIONER_PERL_VERSION=5.16
(I can't test this at the member as my Mac only has one version of Perl installed at the moment.)
Sources: http://krypted.com/mac-os-x/perl-control/ and https://gist.github.com/crankycoder/1389144
add a comment |
You should be able to do this with either of the following commands:
defaults write com.apple.versioner.perl Version -string 5.16
or
export VERSIONER_PERL_VERSION=5.16
(I can't test this at the member as my Mac only has one version of Perl installed at the moment.)
Sources: http://krypted.com/mac-os-x/perl-control/ and https://gist.github.com/crankycoder/1389144
add a comment |
You should be able to do this with either of the following commands:
defaults write com.apple.versioner.perl Version -string 5.16
or
export VERSIONER_PERL_VERSION=5.16
(I can't test this at the member as my Mac only has one version of Perl installed at the moment.)
Sources: http://krypted.com/mac-os-x/perl-control/ and https://gist.github.com/crankycoder/1389144
You should be able to do this with either of the following commands:
defaults write com.apple.versioner.perl Version -string 5.16
or
export VERSIONER_PERL_VERSION=5.16
(I can't test this at the member as my Mac only has one version of Perl installed at the moment.)
Sources: http://krypted.com/mac-os-x/perl-control/ and https://gist.github.com/crankycoder/1389144
answered Dec 31 '18 at 18:08
MJ WalshMJ Walsh
1412
1412
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f867929%2fosx-10-10-select-perl-5-16-instead-of-5-18%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown