Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Which perl do you use?

by brian_d_foy (Abbot)
on Jan 26, 2005 at 20:40 UTC ( #425370=perlmeditation: print w/ replies, xml ) Need Help??

Which version of perl do you use (or are you forced to use) and why?

I maintain the perlfaq, and today I finally updated the answer to "Which version of Perl should I use?" The old answer focussed on the transition from perl4 to perl5, with touch-up updates to reflect the current version of perl.

I completely rewrote the answer to basically say "Well, it depends..." It's not a "live" answer because I've only proposed the change to perlfaq-workers several minutes ago.

This got me to thinking though: which versions of perl are people really using, and why are they using them? I'm not talking about which operating system they are using, but which release. I know that a lot of people and places are using a lot of different versions, and some for very good reasons. I think I covered those in the new answer.

Even though Perlmonks is a self-selected sample, and I expect most regulars are using perl5.8.x, I still wonder what the shape of the world is, and if the new answer is both useful and realistic (random version bashing from one man perl shops isn't very helpful to large organizations, for instance).


Which version of Perl should I use?

There is often a matter of opinion and taste, and there isn't any one answer that fits anyone. In general, you want to use either the current stable release, or the stable release immediately prior to that one. Currently, those are perl5.8.x and perl5.6.x, respectively.

Beyond that, you have to consider several things and decide which is best for you.

  • If things aren't broken, upgrading perl may break them (or at least issue new warnings).
  • The latest versions of perl have more bug fixes.
  • The Perl community is geared toward supporting the most recent releases, so you'll have an easier time finding help for those.
  • Versions prior to perl5.004 had serious problems with buffer overflows, and in some cases have CERT advisories.
  • The latest versions are probably the least deployed and widely tested, so you may want to wait a few months after their release and see what problems others have if you are risk averse.
  • The immediate, previous releases (i.e. perl5.6.x ) are usually maintained for a while, although not at the same level as the current releases.
  • No one is actively supporting perl4.x. Five years ago it was a dead camel carcass (according to this document). Now it's barely a skeleton as its whitewashed bones have fractured or eroded.
  • There is no perl6.x for the next couple of years. Stay tuned, but don't worry that you'll have to change major versions of Perl soon (i.e. before 2006).
  • There are really two tracks of perl development: a maintenance version and an experimental version. The maintenance versions are stable, and have an even number as the minor release (i.e. perl5.8.x, where 8 is the minor release). The experimental versions may include features that don't make it into the stable versions, and have an odd number as the minor release (i.e. perl5.9.x, where 9 is the minor release).

--
brian d foy <bdfoy@cpan.org>

Comment on Which perl do you use?
Re: Which perl do you use?
by Corion (Pope) on Jan 26, 2005 at 20:47 UTC

    I use 5.8.5 on Win32, as it was the version that I most recently compiled to test out the free MSVC7 toolset.

    On the Debian box, I have 5.6.1 (the stock Debian Perl), to run apt-get, 5.8.0 for testing and 5.8.4 for my scripts.

    At work, I have the IndigoPerl 5.6.1 release and a copy of a self-compiled 5.8.2 for Win32, and 5.005_03 for Solaris, because it is there. I don't have the permissions or inclination to upgrade the Solaris Perl at work, as I use it there mostly as better awk / sed combo.

Re: Which perl do you use?
by dragonchild (Archbishop) on Jan 26, 2005 at 20:47 UTC
    I personally use 5.8.x, whichever minor version is installed on the server I happen to working on at the time.

    However, I do try and write my CPAN modules with 5.005_03 in mind. So, things like:

    • No "use warnings" - only check $^W. And, don't enable warnings in your modules. (It's impolite.)
    • No assumption of Unicode-aware Perl - I make allowances for usage of Unicode::String.
    • Nothing with threads (luckily, I don't ever need it)
    • No pseudohashes

    That's cause I know my modules are currently used in one place that's on 5.005_03 and I still have friends there. :-)

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Re: Which perl do you use?
by fireartist (Chaplain) on Jan 26, 2005 at 20:54 UTC

    My main work server (solaris) has 5.005_03, which is why I installed 5.8.4 (the newest at the time) in my home directory.

    My work machine booting in WindowsXP always has the latest ActiveState release (currently 5.8.6), booting in Linux has 5.8.5 (preinstalled with fedora 3).

    My home mac has 5.8.5; had to build it myself because the Apple installed version has threads switched on, which DBD doesn't like.

    My laptop borrowed from work also has ActiveState 5.8.6

    ...so to summarize, generally the latest stable release.

Re: Which perl do you use?
by sleepingsquirrel (Hermit) on Jan 26, 2005 at 21:01 UTC
    I usually use the latest stable release (5.8.6 currently) for one simple reason. Whenever I find a new way to make perl segfault, I upgrade to see if its been fixed in the latest release.


    -- All code is 100% tested and functional unless otherwise noted.
Re: Which perl do you use?
by Anonymous Monk on Jan 26, 2005 at 21:02 UTC
    Also, new versions have meaningful error messages. Under 5.5.3 (and before? - I never tested anything older than 5.5.3) you may get a completely unrelated error message. And I also don't use "warnings" and other other goodies (like "our") in public code. But I use them, if I'm coding a GUI, since it's generally better to use a recent version of perl for gui progs.
      it's generally better to use a recent version of perl for gui progs
      Can you explain this?
Re: Which perl do you use?
by McMahon (Chaplain) on Jan 26, 2005 at 21:23 UTC
    5.8.3 on WinXP
    5.8.6 on Win2K
    5.8.5 on FreeBSD 5.3
    5.8.0 on FreeBSD 4.8
    5.6.? maybe on the Mac at home-- haven't used that in a while.

    I use these simply because they were convenient at the time.
    I'm not using any bleeding- or even cutting-edge features, so I just take what's easiest to find.
Re: Which perl do you use?
by etcshadow (Priest) on Jan 26, 2005 at 22:35 UTC
    We use 5.005_03. Why? Well, the app we work on started about 6 years ago. We haven't upgraded yet simply because it hasn't been worth the effort. We were actually planning on upgrading to 5.8.4 this february, but the project got tanked when the contractor we'd hired to do it for us turned out to be a complete and total train-wreck (not that we needed a contractor... it's complicated: we hired this guy as a contractor because we sort of wanted to test him under controlled parameters, with a fairly isolated project, and we're glad we did). So, anyway, it'll happen eventually, but right now our developers are otherwise occupied.
    ------------ :Wq Not an editor command: Wq
Re: Which perl do you use?
by vek (Prior) on Jan 26, 2005 at 22:57 UTC

    5.6.1 on production and QA Solaris boxen at work. 5.8.4 on my laptop & desktop (shipped with ubuntu warty).

    -- vek --
Re: Which perl do you use?
by itub (Priest) on Jan 27, 2005 at 01:02 UTC
    I use mostly 5.8.x, but I have 5.6.1 hanging around and try to develop for backward compatibility with it. I don't care about 5.005 or earlier anymore.
Re: Which perl do you use?
by greenFox (Vicar) on Jan 27, 2005 at 02:12 UTC

    5.8.X where I get a choice, that is on machines I administer and can justify the upgrade, and generally 5.6.X elsewhere though I seem to recall a slowaris box somewhere with an old 5.00X on it but I can't find it just now. I usually try and keep boxes up to a minimum of the stable release before the current stable but for a variety of reasons outside of my control that is not always possible.

    --
    Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho

      ...and can justify the upgrade...

      I think you've hit on a good point. This is precisely the reason why some of our production boxen are running 5.6.1 and not something later. Upgrading Perl on 'stable' systems that have been in production for a couple of years is just asking for a roaring chorus of if it aint broke, don't fix it.

      -- vek --

        To be honest I have gotten away with justifications as thin as "standardise Perl build across infrastructure..." but thats probably because large organisations, like the one I work for, tend to be teaming with people who love to hear about things being "standardised" *grin*

        --
        Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho

Re: Which perl do you use?
by trammell (Priest) on Jan 27, 2005 at 02:44 UTC
    Debian stable.
Re: Which perl do you use?
by gube (Parson) on Jan 27, 2005 at 03:27 UTC

    Hi, I am using 5.8.x i think it's better than the older versions. Here some advantage than 5.6.x and also some modules were added than the 5.6.x it's easy to use some more modules than 5.6.x


    Regards,
    Gubendran.L
Re: Which perl do you use?
by Mr. Muskrat (Abbot) on Jan 27, 2005 at 03:53 UTC

    At work, it's a little bit of this, a little bit of that depending on when the scripts were written. Some of our Solaris boxes have 5.00x. (5.005_03? I can't recall as it's been a while since I've had to use them.) Some of our linux boxes have 5.6.x but most have 5.8.x. Some of our WinXP boxes have 5.8.x too.

    At home it's 5.8.6.

Re: Which perl do you use?
by dws (Chancellor) on Jan 27, 2005 at 04:03 UTC

    I'm using whatever installs with Fedora Core 3. Without looking, I couldn't tell you the version other than that it's 5.8.something. If I'm within earshot of current, I don't pay that much attention to the specific version.

Re: Which perl do you use?
by bmann (Priest) on Jan 27, 2005 at 04:24 UTC
    I use 5.8.x:
    • 5.8.4 on Debian (unstable)- upgrading is easy
    • 5.8.2 on FreeBSD (4.x) - upgrading Perl is easy. Upgrading modules is a bigger deal, and this is a production server. I'll upgrade when it's necessary
    • 5.8.6 on Windows (2000 and XP)

    Now, I notice you don't say what version you are using (I'm guessing you don't want to skew anyone else's answers?) May I ask what version(s) you use?

      I use whatever the current machine has, but on my Powerbook, it's perl5.8.4 because that was the current version when I had to install perl after I bought it.

      --
      brian d foy <bdfoy@cpan.org>
Re: Which perl do you use?
by Aristotle (Chancellor) on Jan 27, 2005 at 06:18 UTC

    I make sure never to be working with anything less than 5.8 because good Unicode support is so crucial.

    On my own box, I track the latest stable release closely; currently I have 5.8.6. On machines I deploy to, I don't care a whole lot about the number behind the second dot. Any version of 5.8 means all the utility modules I rely on heavily are available in core and all the language features I require are around (even 5.6 would be sufficient in that regard).

    But I'm a Perl developer, so the Perl interpreter is my core competence and tool of trade. It should be expected that I'd track versions closely.

    If I were a sysadmin responsible for keeping 50 variously sized applications available without interruptions on 30 servers, I'd obviously be taking a different view.

    Makeshifts last the longest.

      good Unicode support is so crucial. ... I don't care a whole lot about the number behind the second dot

      Actually I found that 5.8.0 is quite different from the following versions, so in my experience 5.8.1+ are quite interchangeable, with respect to Unicode at least, but I would try to upgrade from 5.8.0.

Re: Which perl do you use?
by castaway (Parson) on Jan 27, 2005 at 06:28 UTC
    Depends on the location - 5.8.4 on my desktop at home (happens to be the last time I bothered upgrading). 5.6.1 or greater at work - last year I persuaded people that we should increase the minimum supported version from 5.005 to 5.6.1..

    You may be interested to know, that the last versions of HP-UX (11.0) and AIX (4.3.3) that came with older versions of perl (4 and 5.005 respectively), are currently on their way out of support. The latest versions both come with a nice shiny 5.8.x version of perl. (So we may yet jump to just supporting that)

    C.

Re: Which perl do you use?
by grantm (Parson) on Jan 27, 2005 at 07:44 UTC

    I use 5.8.4 on my workstations at work and home (both Debian Sarge).

    All the production machines I target at work currently are running 5.6.1 (Debian Stable).

    As the maintainer of XML::Simple, I get a lot of emails about basic Perl issues that have nothing to do with XML. The latest version of XML::Simple does not work with anything before 5.6 (Unicode support) and I get very few emails about that.

Re: Which perl do you use?
by hv (Parson) on Jan 27, 2005 at 09:46 UTC

    The current release of the work application targets 5.8.1; the next major release is being written to target latest 5.8.x with the defined-or patch (unless it gets delayed, in which case it might go for 5.10.x).

    On my development machine I have 5.8.1 as the default perl, but sometimes use latest 5.8.x or bleadperl to test specific features or to avoid specific bugs.

    Hugo

Re: Which perl do you use?
by Anonymous Monk on Jan 27, 2005 at 10:11 UTC
    It depends on which machine I work, and what I do. The machines I work mostly on, it's all 5.8.456. But I also write stuff that needs to be deployed on machines running 5.6.x, so I have them around as well. And I have some CPAN modules that claim to work from 5.005 onwards, so I do have every version since 5.005 available for testing.
Re: Which perl do you use?
by ZlR (Chaplain) on Jan 27, 2005 at 14:49 UTC
    In the current corp i work at the "target" is 5.6 Win2k.

    This is sometimes very frustrating since 5.8 has some great features that i really really really miss , for instance :

    - Math::BigInt was kinda broken for me in 5.6

    - Win32::Job for 5.8 can redirect the STDERR and STDOUT of a spawned process to whatever file you choose before spawning. I keep complaining about this but it would have made my life so much easier !

    For some reason the migration of perl 5.6 to 5.8 is something that seems impossible to even consider. Maybe new servers will have 5.8 installed, but old ones with 5.6 will keep it. Too many servers, too many different applications, fear of breaking things, lack of knowledge on how to have many versions and their modules coexist ...

    Do not think that it's better on Unix systems, where you will mostly find 5.005_03 ...

Re: Which perl do you use?
by bart (Canon) on Jan 27, 2005 at 15:50 UTC
    Whenever we install a new server at work, we install the latest stable version of Perl, and tend to then stick with it. At the current server, introduced a few months ago, that's a 5.8.?; the previous server, of some several years ago, used 5.6.1. We tend to do extensive testing on the installed apps and scripts, and unless some very annoying bugs pop up, we don't feel the need to upgrade — ever.

    At home, I have 2 PCs, an older Win98 desktop system, where I mostly use Indigoperl 5.6.1, though I have an ActivePerl 5.8.3 installed on it, too. On the newer XP laptop, I only have one installation of Perl: ActivePerl 5.8.4.

    Again I tend to stick with them. It works, and I'm used to it. Though I still regularly use the destop PC, I don't plan on ever upgrading perl on it again. It's not worth it. That is, unless there's some killer module I desperately want, which doesn't work on my older version of Perl.

    On the laptop, I plan to keep up with one of the latest releases of Perl — updates tend to come too frequent these days to follow it up for literally every single release. But I prefer it not to go stale for more than a few months.

    If you ask me, perl 5.6.1 and 5.8.x are going to be around for a very long time. But, that's just my two cents.

Re: Which perl do you use?
by TStanley (Canon) on Jan 27, 2005 at 17:13 UTC
    I have ActiveState Perl 5.8.4 (Build 810) on my Windows NT4 Workstation and Perl 5.6 on my HP-UX mainframe (as well as the original Perl 4).

    I also have ActiveState Perl 5.8.4(Build 810) on my home PC (Windows XP Home)

    Update:After getting home and running "perl -v", I find out that I'm only running Build 806.

    TStanley
    --------
    The only thing necessary for the triumph of evil is for good men to do nothing -- Edmund Burke
Re: Which perl do you use?
by tcf03 (Deacon) on Jan 27, 2005 at 19:41 UTC
  • 5.8.0 and 5.8.5 with linux and openbsd.

  • 5.005_03 on aix.

  • 5.6.1 on HP-UX.

Re: Which perl do you use?
by Anonymous Monk on Jan 28, 2005 at 14:03 UTC
    5.6.0 or later. All code I write tends to work with 5.6.0 or later, even if I develop it using the latest 5.8.x. No features have been put into Perl since 5.6.0 that I actually use, so I don't have a pressing need to upgrade. Sure, there are bugfixes, and sometimes, that makes it worthwhile to upgrade. But unless really needed I don't upgrade -- it too often happens working code breaks because of an upgrade (not always because of a bug in a new version - but a change in behaviour can break a set of applications working together).

    Code I write tends to not work on 5.005_0x (if only because of 'use warnings'). It's usually possible to change code easily to work with 5.005_0x, but I prefer upgrading the Perl on the intended machine. But that's not always possible or easy.

    It has been years since I needed to target 5.004_0x.

Re: Which perl do you use?
by rir (Vicar) on Jan 28, 2005 at 21:59 UTC
    I use 5.6.1 and 5.8.4 primarily. A little bit of admin munging on older perl5's.

    I tend to target 5.8 or 5.6, 5.8 for project which will take awhile, be unattached to existing code, or may fairly warrant its own machine as host. 5.6 for the odd script; most of this would work to 5.004 or so except for my love of the warnings pragma.

    My sense of the differences between 5.6 and 5.8 is dull. I don't chase new releases unless there is something to lure me.

    Be well,
    rir

Re: Which perl do you use?
by demerphq (Chancellor) on Jan 29, 2005 at 09:21 UTC

    All of my production code uses 5.6.2, any experimentation or "fun" stuff is usually on the latest stable release, so currently it would be 5.8.6.

    A couple of things I think really worth pointing out are that probably early 5.8.x release should be avoided, IMO 5.8.4 is the first one really production worthy, and that before migrating from 5.6 to 5.8 its well worth doing a speed/feature analysis. Some code appears to run much faster in 5.6 than it does in 5.8 and if you dont need the added features of 5.8 it may be that migrating results in slower code. I do recommend making sure you are using an up to date 5.6 release.

    A last comment, ive observed that there are definite differences in behaviour of the different versions on different platforms. Users should always specifically investigate ther own circumstances before migrating as good advice from others may be inappropriate in an alternate enviornement.

    ---
    demerphq

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://425370]
Approved by Tanktalus
Front-paged by data64
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-07-30 01:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls