http://qs1969.pair.com?node_id=1013595

I'm really lucky: I get to use Perl every day, and make a living doing it. It's awesome.

However without going into unecessary detail, I'll just say that the Perl that I use at $work is old. Very old. It is considered stable and secure, and is therefore blessed by the powers that be for use in our %ENV.

It's no fun to read learning materials like the Modern Perl book and look at all the things that newer Perls have to offer, while not being able to use them. I'd like to get a chance to use operators like //= (a favorite of mine), or things like sub { state $counter = 0; return $counter++ }, or even builtins like say $foo

I'm guessing there are other monks in similar situations. But I'm curious if this is more common than not. So here's sub the_question {

Do you get to use Modern::Perl at your $job?
}

UPDATE:

I can't make a poll out of this since I'm not a pollster (pollsters), but I will submit this as a poll "idea" in a little while. In the mean time, I want to keep enjoying the discussion as it unfolds. The replies are both informational and entertaining. It is very amusing to see how other monks are using Perl versions/features at $work. So...err... goto \&the_question

UPDATE 2:

By (high?) demand, a Poll has been submitted for review to the pollsters. Happy Voting!

 

Tommy
"irregardless" - n. The act of watering crops without regard

Replies are listed 'Best First'.
Re: Roll Call - How new is your Perl?
by choroba (Cardinal) on Jan 16, 2013 at 16:01 UTC
    You should have created a poll :-)

    At work, we are using 5.10.1, so fortunately, say, state and //= exist. At home (i.e. for fun and contract side jobs) I use 5.14.2. I also happen to have the blead perl checked out somewhere to check for a bug before I send a bug report.

    I have been bitten once by the difference: at home, I forgot to dereference an arrayref in push, which worked ok in 5.14, but crashed in 5.10. So far so good.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: Roll Call - How new is your Perl?
by tobyink (Canon) on Jan 16, 2013 at 16:08 UTC

    At home my default install is 5.16.2, but if you'd asked a couple of days ago it would have been 5.16.0.

    As a freelancer I have to work with a variety of Perls, but I think the oldest I deal with regularly is 5.10.1.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re: Roll Call - How new is your Perl?
by blue_cowdawg (Monsignor) on Jan 16, 2013 at 16:12 UTC

    Official Answer: it depends.

    My work laptop runs Perl under Cygwin which runs v5.14.2. Our production systems run Perl ranging from stone tablets (perls from oysters?) to a locally home grown Perl "distro" configured at 5.10.x (not sure about the x) and no two seem to be the same.

    I'm currently trying to mint my own Perl package for deployment so I can write stuff on my laptop and have a HOPE of having it run on the production systems.


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re: Roll Call - How new is your Perl?
by MidLifeXis (Monsignor) on Jan 16, 2013 at 16:17 UTC

    5.8.8 due to vendor library, currently moving to 5.14 along with vendor upgrade. A vendor supporting only a single version of Perl makes upgrades fun, as a change to the vendor back end can necessitate updating front-end code as well.

    A platform change is requiring validation (and an excuse to remedy some past coding sins) of all code anyway, so the ability to bring everything up to the most current infrastructure that the vendor supports in one swell foop is a plus.

    Now if I could just get the vendor to support more than one version of Perl at a time so that I can break future updates into a single moving part at a time.

    --MidLifeXis

Re: Roll Call - How new is your Perl?
by ww (Archbishop) on Jan 16, 2013 at 23:45 UTC

    No! I do not use Modern::Perl on the job... or at home!

    I have experimented with it... and (oddly?) prefer my own way of doing most of what M::P would do for me.

    Call that a consequence of an aging brain or something because I have next to nothing 'substantive' to my preference on this.

Re: Roll Call - How new is your Perl?
by ramlight (Friar) on Jan 16, 2013 at 16:20 UTC

    @$work = 5.8.8

    Since the finished scripts are then used by a number of production systems, there is no possibility that this will change in the future (or at least during my tenure as a contractor here.)

    As a result, I have the 5.8.8 version of the documentation bookmarked so that I can quickly check to be sure that what I want to do is valid for version of Perl that I use.

Re: Roll Call - How new is your Perl?
by mje (Curate) on Jan 16, 2013 at 17:10 UTC

    At $work we use a variety of Perls. Strawberry Perl on a Windows machine which does some data munching for accounts - it is probably an early strawberry perl - not sure. Elsewhere Perl is installed all over the place on a variety of hardware including Linux 32/64, Solaris Sparc/Intel, AIX, HP-UX, OSx and loads more lesser known/used. On Linux machines mostly the system supplied Perl is used and on other operating systems it is either perlbrew or built by ourselves and installed into /usr/local/perl. These non-windows installs are mostly for testing or to do some specific job e.g., an internal web site.

    For the current project I'm working on we use 5.16.0 installed via perlbrew but in all honesty we could upgrade pretty much whenever we want. Mostly, recently, we've only upgraded when hitting a Perl core issue which was not back ported (the last one was a taint issue IIFC) as it is quite a lot of effort to get all non-core modules installed again and tested. Our 5.16.0 contains one patch from an issue I reported a while back ("double free or corruption" "Invalid write of size 4" in File::Glob? and your post reminded me to check what happened to it.

    We use a few features from more modern Perl but not a lot. We briefly used smart match then when it changed (between 5.10 and 5.10.1 IIRC) and we got caught out we stopped using it. We use state, // and some regexp enhancements quite a bit (named captures etc). Unicode support is very important to us to anything that in that area gets our attention quickly.

    At home I use loads of different versions under perlbrew mostly and also strawberry perl so I can test modules I maintain. I also have a raspberry pi running a recentish Perl but I forget which version and a nettop box running Linux and Perl 5.16.0.

Re: Roll Call - How new is your Perl?
by VinsWorldcom (Prior) on Jan 16, 2013 at 16:26 UTC

    Current setup is Windows 7 x64 with Strawberry 5.16.1.

    I don't really use Perl all that much with my job. I have a few scripts that automated some daily tasks that I no longer do as my job role changed. I try to keep them up to date with new improvements for the few colleagues that still use my scripts.

    I develop on Windows and started with ActiveState but moved to Strawberry 3-4 years ago. Current setup as above, but I also have 5.12.2 and 5.8.8 installed for testing mainly with Sockets (IPv6 support). I use Re: Multiple Strawberry Perl Versions under Windows to manage the different installations.

    I learned Perl back in the late 1990's and have greatly increased my knowledge since joining this site back in 2009. Unfortunately, my coding style is still more 1990's and I don't really make use of many of the newer features - probably to my own detriment as I'm not really version dependent due to work.

    Agree with Choroba - you should make this a poll question!

Re: Roll Call - How new is your Perl?
by Tux (Canon) on Jan 17, 2013 at 17:37 UTC

    I am a lucky guy (maybe): I can decide what we use at work. It just forces me to take the time to build from scratch and install all required modules. My work usually involves working on HP-UX (and - loathe - AIX). I am one of the people making perl binary depots available for HP-UX, so I have to build it anyway. When I would depend on AIX/IBM for a working perl distribution, I'd probably be still using 5.6.0, as AIX/IBM don't care about open source. HP does a bit better, but still lack actual builds.

    On production boxes - and thus the boxes of our customers, we currently run 5.14.2.

    On my laptop I run the newest stable version as production, but with 135 versions of perl installed with various configuration options, I can check and use whatever I want, even nightly builds.

    On my workstation, I run the latest stable (5.16.2 currently), which I use to test all company stuff on before I decide to move onward on the servers.

    I do not care a single *beep* about Modern::Perl. If I have to install that on every single version of perl, most of them wouldn't work I guess and I don't see it offering more than what use 5.14.2; use warnings; already offers me. I will have to keep wondering what it was that the module offers me over that warrant its use: As from its man page "it may include additional core modules and pragmas". Thanks, but no thanks.

    I used defined-or from 5.8.0 onward. As I maintained the patchset to enable that in 5.8.x, I just built my perls to include it.

    I never use system-perl for anything production-like.


    Enjoy, Have FUN! H.Merijn
Re: Roll Call - How new is your Perl?
by Your Mother (Archbishop) on Oct 26, 2017 at 12:45 UTC

    More than four years after the OP… and nine years after EOL :'(

    ym@work[3715]~>perl -le 'print `date`, $]' Thu Oct 26 05:40:51 PDT 2017 5.008008

      STILL HERE! Now using 5.22, and 5.26 on various Unix/Linux/BSD/Mac/Windoze machines the world over...

      Tommy
      A mistake can be valuable or costly, depending on how faithfully you pursue correction
Re: Roll Call - How new is your Perl?
by sundialsvc4 (Abbot) on Jan 16, 2013 at 17:21 UTC

    Usually there is some very-important production system that is absolutely dependent, source-code wise, on some early version of Perl.   What I suggest that people should do in that case is to define an environment-variable in the production context, named, say, $PERL_CMD.   This variable is hard-coded to the Perl interpreter needed by this program, which, in turn, has been hard configured to refer to an isolated set of CPAN libraries which it, itself, has built ... i.e. without resorting to PERL5LIB, which of course also is given a known value.   Every script invokes Perl by reference to $PERL_CMD.   What you achieve by doing this is to isolate the Perl that this system relies-on from the system at large.   You include all of the scripts, and all of the documentation, in the source-code control system tree for that app.

    This, if done correctly, relieves you from the obligation to keep “the system at large” at an older level, and it also circumvents any interdependency between two similar apps that might both need to run on the same boxes.   The only “cost,” which becomes inconsequential through the use of SANs and so-forth, is disk space.

    It does get a little bit more interesting when the distro-maintenance software for a Linux system also runs in Perl, as many do.   To handle this case, newer versions of Perl can be set up in /usr/local/whatever.   It does, alas, get a little bit messy at times.

Re: Roll Call - How new is your Perl?
by DrHyde (Prior) on Jan 17, 2013 at 11:23 UTC
    $ perl -v This is perl, v5.8.8
    Why? It works, so I haven't felt the urge to "fix" it.
Re: Roll Call - How new is your Perl?
by drpaz (Acolyte) on Jan 17, 2013 at 14:25 UTC
    5.8.8 on rhel5.6 x86_64 - I have the power to change it, but getting root out on the work machines is an horrific amount of paperwork, and if I go 'too new' then there's more paperwork to register the use of new Open Source Software.
Re: Roll Call - How new is your Perl?
by moritz (Cardinal) on Jan 17, 2013 at 17:53 UTC

    At $work we are currently upgrading from Debian Lenny (oldstable, with perl 5.10.0) to Debian Wheezy (testing, with Perl 5.14.2). So occasionally I have to support 5.10.0, but most of the development focuses on 5.14.

    At home I used perlbrew'ed perl 5.16.0.

    Since I happen to find your poll idea to be a bit ambiguous, I came up with my own: How Modern Is Your Perl?.

Re: Roll Call - How new is your Perl?
by sedusedan (Monk) on Jan 16, 2013 at 17:43 UTC
    Identical with choroba: 5.10.1 on servers (Debian stable) and 5.14.2 on workstation/laptop (Debian Sid, Ubuntu). Naturally, I haven't embraced new features of 5.12 and 5.14 all that much.
Re: Roll Call - How new is your Perl?
by hominid (Priest) on Jan 16, 2013 at 20:43 UTC
    This is perl, v5.8.9 built for MSWin32-x86-multi-thread. Sigh.

      That's still better than me! hominid sighs while Tommy cries...

      Tommy
      "irregardless" - n. The act of watering crops without regard
Re: Roll Call - How new is your Perl?
by SuicideJunkie (Vicar) on Jan 17, 2013 at 15:26 UTC

    I've got mostly 5.10 (system perl) and 5.14 (windows) going, but I've also got an old win98 laptop that's running 5.8, maybe 5.6.

    For the laptop I needed a version that worked under 98 and was tiny enough to fit on the drive. I've since gotten a netbook, so it hasn't been booted in a while.

    For the 5.10 system perl, I just don't have the motivation to install a side version of newest perl. Its already got //= ops, and I'm not using the newer features.

Re: Roll Call - How new is your Perl?
by QM (Parson) on Aug 16, 2018 at 11:31 UTC
    I have 5.22.1 on my VM.

    Since we don't use it at $work much, except for personal projects, it doesn't matter. But if we did, I would just keep upgrading my VM periodically, and then checking that the production version still works for the code. As it is, it's probably time to upgrade again. Maybe after I update to Ubuntu 18 LTS.

    Since everything seems to be going to the cloud these days, and the cloud providers tend to provide fairly recent versions, it makes sense to just keep ratcheting up, fixing issues as they come up in the version transitions. Because at some point, some feature will be deprecated, or some "it works this way" sugary tidbit that was never really intended will go away.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

Re: Roll Call - How new is your Perl? (meh)
by tye (Sage) on Jan 17, 2013 at 20:28 UTC

    We just recently finished a major upgrade at work and so we moved from Perl 5.8.8 (IIRC) to 5.10.1. That's how long the upgrade took.

    Not that I found lack of // or 'state' to be much of a problem. || is often a better choice than // and the few cases when I wanted //, the work-around is hardly onerous. Even though we could now start using 'state', we just use 'our' instead (because it eases certain types of unit tests).

    I still have no clue what the point of Modern::Perl is.

    - tye        

Re: Roll Call - How new is your Perl?
by perl514 (Pilgrim) on Jan 18, 2013 at 13:51 UTC

    Hi,

    At work I have Perl 5.14.2 installed (DWIM Perl) and at home, its either Ubuntu 12.04 having same Perl Version as above or on Windows 7 I have Strawberry Perl 5.16.2.

    Good thing is, there are some applications on our company servers that have ActivePerl 5.8.8, but DWIM Perl installs in a seperate directory, so its awesome!!

    Unfortunately, Perl isn't an absolute must for my work, but I keep trying to learn it to automate stuff. Knowing some way to automate stuff I think will take me somewhere. Besides, it's fun :)

    Perlpetually Indebted To PerlMonks

    use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";

Re: Roll Call - How new is your Perl?
by pokki (Monk) on Jan 18, 2013 at 17:26 UTC

    $work has This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi on some machines, This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi on some others, This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi on yet some more. Jenkins knows about 5.8.8 and 5.10.1. I have perlbrew on my workstation so I can cope.

    $home has 5.14.2 (+ perlbrews) on the desktop, 5.14.2 on the Raspberry Pi.

Re: Roll Call - How new is your Perl?
by pfaut (Priest) on Aug 16, 2018 at 20:29 UTC

    At work, we have:

    • VMS machines that are running V5.8.6 because that's what shipped with the VMS version of Apache we are running. I have my own private copy of V5.16.2.
    • Linux machines running various Red Hat releases. RH6.x machines have V5.10.1. RH7.x machines have 5.16.3. I have my own private copy of V5.24.1

    At home I run gentoo which has V5.24.3.

    Unfortunately, although I keep using perl for a lot of stuff I haven't really kept up with what changed in each release since around V5.10.

    90% of every Perl application is already written.
    dragonchild
Re: Roll Call - How new is your Perl?
by thomas895 (Deacon) on Jan 19, 2013 at 02:56 UTC

    At home, I use 5.12.3, primarily. It works just fine.
    Last summer, I worked with an old RedHat(4, I think?), with 5.8.4, if I remember correctly. Perl wasn't really a direct requirement for that, and I only used it once or twice anyway.

    I suppose I could install the latest and greatest every time, but what's the point?

    ~Thomas~ 
    "Excuse me for butting in, but I'm interrupt-driven..."