develooper Front page | perl.perlfaq.workers | Postings from January 2005

perlfaq1: "Which version of Perl should I use?" and "What are perl4, perl5, or perl6?"

Thread Next
January 26, 2005 11:31
perlfaq1: "Which version of Perl should I use?" and "What are perl4, perl5, or perl6?"
Message ID:

* "Which version of Perl should I use?"

   + I rewrote the answer to give general advice (use the latest
   stable version), but also to point out some of the trade-offs
   to consider

   + the updated answer knows that perl5.8.x is the recent stable
   version, and further emphasizes that perl4 is dead, dead, dead

   + I address perl6, but only to say that there is no need to
   worry just yet.

* "What are perl4, perl5, or perl6?"

   + This is a title change, adding perl6 to the answer

Index: perlfaq1.pod
RCS file: /cvs/public/perlfaq/perlfaq1.pod,v
retrieving revision 1.16
diff -u -d -r1.16 perlfaq1.pod
--- perlfaq1.pod  3 Jan 2005 18:43:37 -0000  1.16
+++ perlfaq1.pod  26 Jan 2005 19:27:41 -0000
@@ -56,39 +56,99 @@
 =head2 Which version of Perl should I use?
-You should definitely use version 5.  Version 4 is old, limited, and
-no longer maintained; its last patch (4.036) was in 1992, long ago and
-far away.  Sure, it's stable, but so is anything that's dead; in fact,
-perl4 had been called a dead, flea-bitten camel carcass.  The most
-recent production release is 5.8.2 (although 5.005_03 and 5.6.2 are
-still supported). The most cutting-edge development release is 5.9.
-Further references to the Perl language in this document refer to the
-production release unless otherwise specified.  There may be one or
-more official bug fixes by the time you read this, and also perhaps
-some experimental versions on the way to the next release.
-All releases prior to 5.004 were subject to buffer overruns, a grave
-security issue.
+(contributed by brian d foy)
-=head2 What are perl4 and perl5?
+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,
-Perl4 and perl5 are informal names for different versions of the Perl
-programming language.  It's easier to say "perl5" than it is to say
-"the 5(.004) release of Perl", but some people have interpreted this
-to mean there's a language called "perl5", which isn't the case.
-Perl5 is merely the popular name for the fifth major release (October
-while perl4 was the fourth major release (March 1991).  There was also
-perl1 (in January 1988), a perl2 (June 1988), and a perl3 (October
+Beyond that, you have to consider several things and decide which
+is best for you.
-The 5.0 release is, essentially, a ground-up rewrite of the original
-perl source code from releases 1 through 4.  It has been modularized,
-object-oriented, tweaked, trimmed, and optimized until it almost
-look like the old code.  However, the interface is mostly the same, and
-compatibility with previous releases is very high.
-See L<perltrap/"Perl4 to Perl5 Traps">.
+=over 4
-To avoid the "what language is perl5?" confusion, some people prefer to
-simply use "perl" to refer to the latest version of perl and avoid
-"perl5" altogether.  It's not really that big a deal, though.
+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
+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).
+=head2 What are perl4, perl5, or perl6?
+(contributed by brian d foy)
+In short, perl4 is the past, perl5 is the present, and perl6 is the
+The number after perl (i.e. the 5 after perl5) is the major release
+of the perl interpreter as well as the version of the language.  Each
+major version has significant differences that earlier versions cannot
+The current major release of Perl is perl5, and was released in 1994.
+It can run scripts from the previous major release, perl4 (March 1991),
+but has significant differences. It introduced the concept of
+complex data structures, and modules.  The perl5 interpreter was a 
+complete re-write of the previous perl sources.
+Perl6 is the next major version of Perl, but it's still in development
+in both its syntax and design.  The work started in 2002 and is still
+ongoing.  Many of the most interesting features have shown up in the
+latest versions of perl5, and some perl5 modules allow you to use some
+perl6 syntax in your programs.  You can learn more about perl6 at
+ .
 See L<perlhist> for a history of Perl revisions.

brian d foy,

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About