ActivePerl 5.10.0 Build 1001 release
am 19.12.2007 01:51:10 von Jan DuboisPerl 5.10.0 has been released today, the first in the 5.10.x major
version series, after a five year long development process.
Coincidentally today is also the 20th anniversary of the very first
release of Perl 1 to the public.
------------------------------------------------------------ ----------
ActiveState is pleased to announce ActivePerl 5.10.0 Build 1001, a
complete, ready-to-install Perl distribution for Windows, Mac OS X,
Linux, Solaris, and AIX.
This build is based on the release version of Perl 5.10.0.
For detailed information or to download this release, see:
http://www.activestate.com/Products/activeperl
New in ActivePerl 5.10.0 Build 1001
===================================
Some exciting new features to look for:
* The new switch statement and smart-match operator
The new smart-matching operator ~~ compares two expressions with each
other; the exact nature of the match is being determined by the types of
both expressions: matching a string and hash will return if the hash
contains a key equal to the string; matching a regular expression
against an array will return if any element of the array matched
successfully against the regexp etc.
The new switch statement will smart-match a single expression repeatedly
against a list of other expression until one matches. For example:
given($foo) {
when ("foo") {
say '$foo is the string "foo"';
}
when ([1,3,5,7,9]) {
say '$foo is an odd digit';
continue; # Fall through
}
when ($_ < 100) {
say '$foo is numerically less than 100';
}
default {
die q(I don't know what to do with $foo);
}
}
* Defined-or operator
The new defined-or operator // allows you to write
$a // $b
instead of repeating the first argument as in
defined $a ? $a : $b
Also the statement
$c //= $d;
can now be used instead of
$c = $d unless defined $c;
* Many improvements to the regular expression engine, including:
The regular expression engine is no longer recursive, meaning that
patterns that used to overflow the stack will either die with useful
explanations, or run to completion, which, since they were able to blow
the stack before, will likely take a very long time to happen.
- It is now possible to write recursive patterns that are easy to read
(for a regular expression), and are executed in an efficient manner.
- It is now possible to name capturing parenthesis in a pattern and
refer to the captured contents by name. The naming syntax is
(?
the \k
accessible via the %+ hash:
my $value = "foo 42";
if ($value =~ /^(?
say "Name $+{name} and Number $+{number}";
}
- possessive quantifiers
- backtracking control verbs
- relative backreferences
Other new features include:
* new say() function
* lexical $_ variable
* _ prototype
* UNITCHECK blocks
* state variables
* stacked filetest operators
* byte-order modifiers for pack() and unpack()
* Many bug fixes
* Additional core modules
* Extended documentation
Download ActivePerl 5.10.0 Build 1001 now:
http://www.activestate.com/Products/activeperl
Getting Started
===============
Whether you're a first-time user or a long-time fan, our free resources
will help you get the most from ActivePerl.
Mailing list archives:
http://aspn.activestate.com/ASPN/Mail/Browse/Threaded/Active Perl
Feedback
========
Everyone is encouraged to participate in making Perl an even better
language.
For bugs related to ActiveState use:
http://bugs.activestate.com/enter_bug.cgi?product=ActivePerl &version=1001
For bugs related directly to Perl please use the 'perlbug' utility.
Enjoy!
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs