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>
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.