Ubuntu 9.10 comes with Perl 5.10.0. I decided to upgrade it to the 5.10.1. This is usually not recommended to upgrade system perl, there are rumours that this may cause numerous problems if not render the system completely unusable, so accepted way is to install new perl into separate directory. Still I wanted to try and here’s description of how you can reproduce what I’ve done.

  1. Download source package for perl for Debian/Sid from http://packages.debian.org/sid/perl.
  2. cd into directory which contains sources and unpack them using
    dpkg-source -x perl_5.10.1-8.dsc
    
  3. cd into perl-5.10.1 directory created as result of previous operation
  4. build package using
    dpkg-buildpackage
    
  5. dpkg-buildpackage may fail because of unsatisfied build dependencies, in this case you should install these dependencies and try to build again.
  6. after successful build you can find packages for the latest Perl in the same directory as the source package. Install them using
    dpkg -i ...

    command. Here some problems are possible if some package requires 5.10.0 and doesn't want 5.10.1. In my case that was only dh-make-perl, which I removed and reinstalled later as ordinary Perl module. You should somehow solve such problems. It is good idea to have native Perl packages available, so if you fail, you could easily restore original configuration.</li>

  7. check perl version
    perl -V
  8. </ol>