OSX 10.10 select perl 5.16 instead of 5.18












1















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









share|improve this question



























    1















    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









    share|improve this question

























      1












      1








      1


      1






      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









      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 22 '15 at 9:21









      bufferoverflow76bufferoverflow76

      62




      62






















          2 Answers
          2






          active

          oldest

          votes


















          0














          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.






          share|improve this answer































            0














            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






            share|improve this answer























              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
              });


              }
              });














              draft saved

              draft discarded


















              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









              0














              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.






              share|improve this answer




























                0














                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.






                share|improve this answer


























                  0












                  0








                  0







                  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.






                  share|improve this answer













                  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.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 17 '15 at 3:19









                  zacksezackse

                  51237




                  51237

























                      0














                      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






                      share|improve this answer




























                        0














                        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






                        share|improve this answer


























                          0












                          0








                          0







                          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






                          share|improve this answer













                          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







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 31 '18 at 18:08









                          MJ WalshMJ Walsh

                          1412




                          1412






























                              draft saved

                              draft discarded




















































                              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.




                              draft saved


                              draft discarded














                              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





















































                              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







                              Popular posts from this blog

                              Сан-Квентин

                              8-я гвардейская общевойсковая армия

                              Алькесар