Is it possible to have two different versions of Perl?

I currently have Perl 5.8.8. Can I upgrade Perl 6? I am using Red Hat Linux 5 OS. Is it possible to upgrade Perl on Red Hat Linux 5 or any other OS? If so, how can I do this?

+5
source share
2 answers

I will try to formulate an answer that will answer all your requests, HTH:

  • I would not touch the Perl system, because other system software may be version specific. If you need another version of Perl 5 for development, it might be best to install it in a controlled sandbox.

  • You can use tools like Perlbrew for this : with Perlbrew you can install different versions of Perl 5, and you can switch back and forth to suit your development needs

  • You say you want to upgrade to Perl 6. You may have noticed that I wrote Perl 5 in the previous paragraphs. Perl 6 is not just a new version of Perl, but a deep evolution of the language: it stems from the same basic principles, but it is very different from her older brother. Code written in Perl 5 will not work in Perl 6, for example

Summarizing:

  • Your system may have either Perl 5 or Perl 6, but these are different languages.
  • You can have multiple versions of Perl 5 with Perlbrew
  • I would suggest not interfering with the version of Perl distributed with the OS
+12
source

Perl 5 and Perl 6 are really different languages ​​that have a name. Installing Perl 6 will not overwrite your Perl 5. I assume that you do not want Perl 6 and instead want the latest version of Perl 5 ( v5.26 has just been released ). You may consider upgrading everything to a recently released one, including your OS;)

If you are interested in what your package manager is about to install, you can see the list. Perhaps I wonder how to list the contents of a package using YUM? .

In addition to the installed Perl 5 system, you can download, compile and install other versions of Perl5 to any place you like. I have all the pearls installed, for example, and the perl system still exists.

+7
source

Source: https://habr.com/ru/post/1270158/


All Articles