Language Update: Perl

by @dankogai

Perl (5|6)?

Perl (5|6)?

Mostly about Perl 5

Then and Now

20022012
Perl 55.85.16

Then and Now

20022012
Perl 55.85.16
EncodingLegacyUTF-8

Encoding

use v5.16;
use utf8;
use encoding 'utf8';

sub ふば {
    ["ふぃず"]->[ $_ % 3 ] 
  . ["ばず"]->[ $_ % 5 ]
  || $_
}
say ふば($_) for 1..30;

Then and Now

20022012
Perl 55.85.16
EncodingLegacyUTF-8
use 5.Xchecks versionchange version

use 5.X

my $string = "Hello, world!";
print $str;

use 5.X

use strict;
use warnings;
my $string = "Hello, world!";
print $str;

use 5.X

use v5.16;
my $string = "Hello, world!";
print $str;

use 5.X

use v5.8;
my $string = "Hello, world!";
print $str;

Then and Now

20022012
Perl 55.85.16
EncodingLegacyUTF-8
use 5.Xchecks versionchange version
use featuresay, //, __SUB__…

use feature

{
  use feature 'say';
  say ["Fizz"]->[ $_ % 3 ] 
    . ["Buzz"]->[ $_ % 5 ]
      || $_
    for 1..30;
}

use feature

{
  use feature 'say';
  say ["Fizz"]->[ $_ % 3 ] 
    . ["Buzz"]->[ $_ % 5 ]
      || $_
    for 1..30;
}
say "Hello";

__SUB__

use feature qw/say current_sub/;
sub {
  my $n = shift;
  say ["Fizz"]->[ $n % 3 ] 
    . ["Buzz"]->[ $n % 5 ]
    || $n;
  __SUB__->( ++$n ) if $n < 30;
}->(1);

__SUB__

use feature qw/say/;
sub {
  my $n = shift;
  say ["Fizz"]->[ $n % 3 ] 
    . ["Buzz"]->[ $n % 5 ]
    || $n;
  __SUB__->( ++$n ) if $n < 30;
}->(1);

Simply Put

Simply Put

Simply Put

Simply Put

Simply Put

One more thing

Language Update Decade

Language Update Decade

The most important LL is missing!

20022012
ServerPerl, PHP, Python, Ruby …Perl, PHP, Python, Ruby, JavaScript

The most important LL is missing!

20022012
ServerPerl, PHP, Python, Ruby …Perl, PHP, Python, Ruby, JavaScript
ClientJavaScript

JavaScript the only language

iOS5

JavaScript + Something

20022012
WebStaticDynamic
HTML4.015 = HTML+CSS+JS
Server emitsHTMLJSON
Web programmingServer SideBoth Sides
LanguageLL of your choiceJS + LL of your choice

JavaScript ∽ Perl

Perl != JavaScript

Use Perl

The following shall remain true for years to come.

御礼なう

sub questions {
  answer shift and __SUB__->(@_);
}