skip to Main Content

Will perl 5.8.4 scripts work with perl 5.16.3?

I was trying to install perl in CentOS 7. Default version seems to be 5.16.

Will perl 5.8.4 scripts work correctly in 5.16?

This is what I tried. Looks like default version is 5.16. Hence the question.

sudo yum install perl

================================================================================
 Package                    Arch       Version                   Repository
                                                                           Size
================================================================================
Installing:
 perl                       x86_64     4:5.16.3-294.el7_6        base     8.0 M
Installing for dependencies:
 perl-Carp                  noarch     1.26-244.el7              base      19 k
 perl-Encode                x86_64     2.51-7.el7                base     1.5 M
 perl-Exporter              noarch     5.68-3.el7                base      28 k
 perl-File-Path             noarch     2.09-2.el7                base      26 k
 perl-File-Temp             noarch     0.23.01-3.el7             base      56 k
 perl-Filter                x86_64     1.49-3.el7                base      76 k
 perl-Getopt-Long           noarch     2.40-3.el7                base      56 k
 perl-HTTP-Tiny             noarch     0.033-3.el7               base      38 k
 perl-PathTools             x86_64     3.40-5.el7                base      82 k
 perl-Pod-Escapes           noarch     1:1.04-294.el7_6          base      51 k
 perl-Pod-Perldoc           noarch     3.20-4.el7                base      87 k
 perl-Pod-Simple            noarch     1:3.28-4.el7              base     216 k
 perl-Pod-Usage             noarch     1.63-3.el7                base      27 k
 perl-Scalar-List-Utils     x86_64     1.27-248.el7              base      36 k
 perl-Socket                x86_64     2.010-4.el7               base      49 k
 perl-Storable              x86_64     2.45-3.el7                base      77 k
 perl-Text-ParseWords       noarch     3.29-4.el7                base      14 k
 perl-Time-HiRes            x86_64     4:1.9725-3.el7            base      45 k
 perl-Time-Local            noarch     1.2300-2.el7              base      24 k
 perl-constant              noarch     1.27-2.el7                base      19 k
 perl-libs                  x86_64     4:5.16.3-294.el7_6        base     688 k
 perl-macros                x86_64     4:5.16.3-294.el7_6        base      44 k
 perl-parent                noarch     1:0.225-244.el7           base      12 k
 perl-podlators             noarch     2.5.1-3.el7               base     112 k
 perl-threads               x86_64     1.87-4.el7                base      49 k
 perl-threads-shared        x86_64     1.43-6.el7                base      39 k

Transaction Summary
================================================================================
Install  1 Package (+26 Dependent packages)

Total download size: 11 M
Installed size: 36 M
Is this ok [y/d/N]: N

2

Answers


  1. Yes. Perl is almost always backwards compatible. That’s its biggest strength and at the same the time its biggest problem.

    Login or Signup to reply.
  2. Probably. Perl puts a lot of effort into maintaining backwards compatibility and most things will probably work. Having said that, there have been things that have changed which will potentially cause problems. The best solution is to set up a test environment with the new version of Perl and to run your test suite there. If you don’t have a test suite, then the best idea is to not change anything at all until you have written a test suite!

    I’m a little concerned that you’re running yum install perl. Centos 7 comes with Perl installed as default. You shouldn’t have to install it. You might, however, like to run yum install perl-core to ensure that you have a full Perl environment available.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search