2. Me
Léon Brocard
French, live in London
Like food
Like the colour orange
Founded Amsterdam.pm, Bath.pm, Croydon.pm
Now leader of London.pm
Started YAPC::Europe
perl hacker
3. Releases
- - Perl
- - Perl
- - Perl
- - Perl
- - Perl
...
Perl is years old
Perl is years old
10. Switch and smart match operator
use feature ’switch’;
given ($foo) {
when (/^abc/) { $abc = 1; }
when (/^def/) { $def = 1; }
when (/^xyz/) { $xyz = 1; }
default { $nothing = 1; }
}
11. Switch and smart match operator
use feature ":5.10";
given($foo) {
when (undef) { say ’$foo is undefined’; }
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 ’< 100’; }
when (&complicated_check) {
say ’a complicated check for $foo is true’;
}
default { die ’Eeeeek’; }
}
12. De ned-or operator
$a // $b
defined $a ? $a : $b
$c //= $d;
$c = $d unless defined $c;
13. Regular expressions
Recursive patterns
Named capture bu ers
Possessive quanti ers
Backtracking control verbs
Relative backreferences
Vertical and horizontal whitespace, and linebreak
14. Named capture bu ers
use feature ’say’;
my $time = ’Time: 01:02:03’;
if ($time =~ /Time:s(d+):(d+):(d+)/) {
say "$1 / $2 / $3";
}
if ($time =~ /Time:s(?<hours>d+):
(?<minutes>d+):(?<seconds>d+)/x) {
say "$+{hours} / $+{minutes} / $+{seconds}";
}
25. Internal changes
Moved from Perforce to Git
Changed directory structure
26. Better quotes
e J.R.R. Tolkien quotes at the head of each C source
le have been checked and proper citations added
27. More tests
Perl . , core tests
(+ , more for bundled libraries)
Perl . . , core tests
(+ , more for bundled libraries)
Perl . . , core tests
(+ , more for bundled libraries)
28. Recent past and future
Perl . . : Léon Brocard on Nov ,
Perl . . : Jesse Vincent on Dec ,
Perl . . : Ricardo Signes on Jan ,
Perl . . : Steve Hay on Feb ,
Perl . . : Ask Bjørn Hansen on Mar ,
...
Perl . : Jesse Vincent early
29. Use Perl . now!
Perl . is faster
Perl . uses less memory
Perl . has more features
Perl . is backwards compatible