Advertisement
Advertisement

More Related Content

Advertisement

Perl 5.14 for Pragmatists

  1. Perl 5.14 for pragmatists
  2. 5.14 perlhist
  3. 5.14 - after 5.8, we had to wait 5 years for 5.10 perlhist
  4. 5.14 - after 5.8, we had to wait 5 years for 5.10 - 5.12 came out 2 years after 5.10 perlhist
  5. 5.14 - after 5.8, we had to wait 5 years for 5.10 - 5.12 came out 2 years after 5.10 - 5.14 came out 1 year after 5.12 perlhist
  6. 5.14 - after 5.8, we had to wait 5 years for 5.10 - 5.12 came out 2 years after 5.10 - 5.14 came out 1 year after 5.12 - 5.16 will come 1 year from 5.14 perlhist
  7. 5.14 perlhist
  8. 5.14 - 5.10 was a huge set of changes (too many!) perlhist
  9. 5.14 - 5.10 was a huge set of changes (too many!) - 5.12 was a lot smaller perlhist
  10. 5.14 - 5.10 was a huge set of changes (too many!) - 5.12 was a lot smaller - 5.14 is in between perlhist
  11. 5.14 - 5.10 was a huge set of changes (too many!) - 5.12 was a lot smaller - 5.14 is in between - just right? perlhist
  12. 5.14 is a Mixed Bag perl5140delta
  13. 5.14 is a Mixed Bag - this talk isn’t just for beginners perl5140delta
  14. 5.14 is a Mixed Bag - this talk isn’t just for beginners - some of these changes are at the edges perl5140delta
  15. 5.14 is a Mixed Bag - this talk isn’t just for beginners - some of these changes are at the edges - but they’re all practical perl5140delta
  16. 5.14 is a Mixed Bag - this talk isn’t just for beginners - some of these changes are at the edges - but they’re all practical - except for the ones that aren’t perl5140delta
  17. By the way, 5.16... perl5150delta
  18. By the way, 5.16... - ...and beyond are going to be interesting perl5150delta
  19. By the way, 5.16... - ...and beyond are going to be interesting - stick around right here after the break and hear Jesse “Double Pumpking” Vincent talk about it perl5150delta
  20. ...and 5.10 is EOL perlpolicy
  21. ...and 5.10 is EOL - we accept critical bugfixes for 2 maint tracks perlpolicy
  22. ...and 5.10 is EOL - we accept critical bugfixes for 2 maint tracks - that’s now 5.14 and 5.12 perlpolicy
  23. ...and 5.10 is EOL - we accept critical bugfixes for 2 maint tracks - that’s now 5.14 and 5.12 - we do security fixes for releases in last 3 years perlpolicy
  24. ...and 5.10 is EOL - we accept critical bugfixes for 2 maint tracks - that’s now 5.14 and 5.12 - we do security fixes for releases in last 3 years - 5.10 was 2007; it gets no promise of support perlpolicy
  25. ...and 5.10 is EOL - we accept critical bugfixes for 2 maint tracks - that’s now 5.14 and 5.12 - we do security fixes for releases in last 3 years - 5.10 was 2007; it gets no promise of support - if you’re still on 5.8, you’re in the weeds perlpolicy
  26. but enough about other versions
  27. let’s talk about 5.14
  28. First: A Warning feature
  29. First: A Warning - 5.14 is backwards compatible feature
  30. First: A Warning - 5.14 is backwards compatible - but has some new behaviors feature
  31. First: A Warning - 5.14 is backwards compatible - but has some new behaviors - they’re not all enabled by default; feature.pm feature
  32. First: A Warning - 5.14 is backwards compatible - but has some new behaviors - they’re not all enabled by default; feature.pm - no new feature.pm features in 5.14! feature
  33. First: A Warning - 5.14 is backwards compatible - but has some new behaviors - they’re not all enabled by default; feature.pm - no new feature.pm features in 5.14! I’m a perldoc ref! feature
  34. First: A Warning - 5.14 is backwards compatible - but has some new behaviors - they’re not all enabled by default; feature.pm - no new feature.pm features in 5.14! feature
  35. Stuff That’s Gone perlsyn
  36. Stuff That’s Gone - modules deprecated in 5.12 are gone in 5.14 perlsyn
  37. Stuff That’s Gone - modules deprecated in 5.12 are gone in 5.14 - you’ll have to install them from CPAN perlsyn
  38. Stuff That’s Gone - modules deprecated in 5.12 are gone in 5.14 - you’ll have to install them from CPAN - do you care? no, because they are: perlsyn
  39. Stuff That’s Gone - modules deprecated in 5.12 are gone in 5.14 - you’ll have to install them from CPAN - do you care? no, because they are: - Class::ISA perlsyn
  40. Stuff That’s Gone - modules deprecated in 5.12 are gone in 5.14 - you’ll have to install them from CPAN - do you care? no, because they are: - Class::ISA - Pod::Plainer perlsyn
  41. Stuff That’s Gone - modules deprecated in 5.12 are gone in 5.14 - you’ll have to install them from CPAN - do you care? no, because they are: - Class::ISA - Pod::Plainer - Switch perlsyn
  42. Stuff That’s Going Perl4::CoreLibs
  43. Stuff That’s Going - Devel::DProf - use Devel::NYTProf instead! - the Perl 4 core - bigrat.pl, ftp.pl, etc - Perl4::CoreLibs - Shell (again) Perl4::CoreLibs
  44. := attributes
  45. := sub login : Local { ... } attributes
  46. := sub login : Local { ... } my $x : Private = 10; attributes
  47. := sub login : Local { ... } my $x : Private = 10; my $x := 10; attributes
  48. := sub login : Local { ... } my $x : Private = 10; my $x := 10; attributes
  49. qw() for my $show qw(Smallville Lost V) { $tivo->cancel_pass( $show ); } perlop
  50. qw() for my $show (qw(Smallville Lost V)) { $tivo->cancel_pass( $show ); } perlop
  51. That’s it! perl5140delta
  52. That’s it! - those are all the things being removed perl5140delta
  53. That’s it! - those are all the things being removed - these are not scary removals perl5140delta
  54. One More Thing! perlsyn
  55. One More Thing! $str =~ m/foo/sand bar; perlsyn
  56. One More Thing! $str =~ m/foo/sand bar; $str =~ m/foo/s and bar; perlsyn
  57. New Regex Modifiers my $hostname = get_hostname; $hostname =~ s/..*//; perlre
  58. New Regex Modifiers my $hostname = get_hostname =~ s/..*//; perlre
  59. New Regex Modifiers (my $hostname = get_hostname) =~ s/..*//; perlre
  60. New Regex Modifiers my $hostname = get_hostname =~ s/..*//r; perlre
  61. New Regex Modifiers my @short_names = map { s/..*//; } @long_names; perlre
  62. New Regex Modifiers my @short_names = map { s/..*//; $_ } @long_names; perlre
  63. New Regex Modifiers my @short_names = map { my $x = $_; $x =~ s/..*//; $s } @long_names; perlre
  64. New Regex Modifiers my @short_names = map { s/..*//r } @long_names; perlre
  65. New Regex Modifiers my @short_names = map s/..*//r, @long_names; perlre
  66. New Regex Modifiers /u /a /aa /l /d perlre
  67. New Regex Modifiers perllocale
  68. New Regex Modifiers /l - use locale rules perllocale
  69. New Regex Modifiers /l - use locale rules YOU DON’T WANT THIS perllocale
  70. New Regex Modifiers perlre
  71. New Regex Modifiers /u - use Unicode rules perlre
  72. New Regex Modifiers /u - use Unicode rules d matches BENGALI DIGIT FOUR perlre
  73. New Regex Modifiers /u - use Unicode rules d matches BENGALI DIGIT FOUR w matches LATIN SMALL LETTER ETH perlre
  74. New Regex Modifiers /u - use Unicode rules d matches BENGALI DIGIT FOUR w matches LATIN SMALL LETTER ETH “N{LATIN SMALL LIGATURE FF}” =~ /ff/ui perlre
  75. New Regex Modifiers /a - Unicode, but ASCII rules for classes d rejects BENGALI DIGIT FOUR w rejects LATIN SMALL LETTER ETH “N{LATIN SMALL LIGATURE FF}” =~ /ff/ai perlre
  76. New Regex Modifiers /aa - Unicode, ASCII won’t match non-ASCII d rejects BENGALI DIGIT FOUR w rejects LATIN SMALL LETTER ETH “N{LATIN SMALL LIGATURE FF}” !~ /ff/aai perlre
  77. New Regex Modifiers /aa - Unicode, ASCII won’t match non-ASCII d rejects BENGALI DIGIT FOUR w rejects LATIN SMALL LETTER ETH “N{LATIN SMALL LIGATURE FF}” !~ /ff/aai “N{LATIN SMALL LIGATURE FF}” !~ /pL/aai perlre
  78. New Regex Modifiers perlre
  79. New Regex Modifiers /d - default semantics perlre
  80. New Regex Modifiers /d - default semantics Use Unicode if it’s seems like it’s perlre
  81. New Regex Modifiers /d - default semantics Use Unicode if it’s seems like it’s maybe kinda unicode or the pattern perlre
  82. New Regex Modifiers /d - default semantics Use Unicode if it’s seems like it’s maybe kinda unicode or the pattern uses p or N{...} perlre
  83. New Regex Modifiers /d - default semantics Use Unicode if it’s seems like it’s maybe kinda unicode or the pattern uses p or N{...} Otherwise, on ASCII systems use ASCII perlre
  84. New Regex Modifiers /d - default semantics Use Unicode if it’s seems like it’s maybe kinda unicode or the pattern uses p or N{...} Otherwise, on ASCII systems use ASCII Otherwise, on EBCDIC systems use Latin-1 perlre
  85. New Regex Modifiers /d - duhhhh-derrrrr semantics Use Unicode if it’s seems like it’s maybe kinda unicode or the pattern uses p or N{...} Otherwise, on ASCII systems use ASCII Otherwise, on EBCDIC systems use Latin-1 perlre
  86. New Regex Modifiers # To be really ASCII-only: die “funny un-American characters” if $str =~ /[^x00-x7F]/; $str =~ /...actual pattern.../; perlre
  87. What should I do?? - Learn as much as you can! - Seriously! - Decode user input, use /aa, use p_ - Consider: use re ‘/aa’ - But mostly: learn more. perlunitut
  88. New Regex Modifiers perlre
  89. New Regex Modifiers $ perl-5.12.4 -E ‘say qr//’ perlre
  90. New Regex Modifiers $ perl-5.12.4 -E ‘say qr//’ (?-xism:) perlre
  91. New Regex Modifiers $ perl-5.12.4 -E ‘say qr//’ (?-xism:) $ perl-5.14.1 -E ‘say qr//’ perlre
  92. New Regex Modifiers $ perl-5.12.4 -E ‘say qr//’ (?-xism:) $ perl-5.14.1 -E ‘say qr//’ (?^u:) perlre
  93. Perl is really good at Unicode. perlunitut
  94. Perl is really good at Unicode. Unicode is just that complex. perlunitut
  95. More Unicode! - ...well, as long as we’re on the subject... perlunitut
  96. Unicode 6 charnames
  97. Unicode 6 charnames
  98. Unicode 6 charnames
  99. Unicode 6 charnames
  100. Unicode 6 charnames
  101. Unicode 6 charnames
  102. Unicode 6 charnames
  103. Unicode 6 charnames
  104. Unicode 6 charnames
  105. Unicode 6 charnames
  106. Unicode 6 charnames
  107. More Unicode! - “unicode_strings” feature is improved - N{...} understands abbreviations - ...and you can make your own - better support for surrogates and non- characters perlunitut
  108. Container Improvements
  109. Stuff From 5.12 perl5120delta
  110. Stuff From 5.12 - local works more better perl5120delta
  111. Stuff From 5.12 - local works more better - assigning to $[ gets a warning perl5120delta
  112. Stuff From 5.12 - local works more better - assigning to $[ gets a warning - each works on arrays perl5120delta
  113. That Stuff in 5.14 perl5140delta
  114. That Stuff in 5.14 - local works even more betterer perl5140delta
  115. That Stuff in 5.14 - local works even more betterer - assigning to ($[) gets a warning perl5140delta
  116. That Stuff in 5.14 - local works even more betterer - assigning to ($[) gets a warning - each works on arrayrefs perl5140delta
  117. each on arrayrefs my @array = qw( foo bar baz ) ; while (my ($k, $v) = each @array) { say “$k: $v”; } perlfunc
  118. each on arrayrefs my @array = qw( foo bar baz ) ; while (my ($k, $v) = each @array) { say “$k: $v”; } 0: foo 1: bar 2: baz perlfunc
  119. each on arrayrefs my $array = [ qw( foo bar baz ) ]; while (my ($k, $v) = each $array) { say “$k: $v”; } 0: foo 1: bar 2: baz perlfunc
  120. each on arrayrefs perlfunc
  121. each on arrayrefs my ($x, $y) = each @{ $h->{foo}[1] } perlfunc
  122. each on arrayrefs my ($x, $y) = each @{ $h->{foo}[1] } my ($x, $y) = each $h->{foo}[1] perlfunc
  123. AVOID each @array
  124. built-ins on references perlfunc
  125. built-ins on references push $arrayref perlfunc
  126. built-ins on references push $arrayref pop $arrayref perlfunc
  127. built-ins on references push $arrayref pop $arrayref shift $arrayref perlfunc
  128. built-ins on references push $arrayref pop $arrayref shift $arrayref unshift $arrayref perlfunc
  129. built-ins on references push $arrayref pop $arrayref shift $arrayref unshift $arrayref splice $arrayref perlfunc
  130. built-ins on references push $arrayref pop $arrayref shift $arrayref unshift $arrayref splice $arrayref keys $arrayref perlfunc
  131. built-ins on references push $arrayref pop $arrayref shift $arrayref unshift $arrayref splice $arrayref keys $arrayref values $arrayref perlfunc
  132. built-ins on references push $arrayref pop $arrayref shift $arrayref unshift $arrayref splice $arrayref keys $arrayref values $arrayref each $arrayref perlfunc
  133. built-ins on references push $arrayref pop $arrayref shift $arrayref unshift $arrayref splice $arrayref keys $arrayref values $arrayref each $arrayref keys $hashref perlfunc
  134. built-ins on references push $arrayref pop $arrayref shift $arrayref unshift $arrayref splice $arrayref keys $arrayref values $arrayref each $arrayref keys $hashref values $hashref perlfunc
  135. built-ins on references push $arrayref pop $arrayref shift $arrayref unshift $arrayref splice $arrayref keys $arrayref values $arrayref each $arrayref keys $hashref values $hashref each $hashref perlfunc
  136. built-ins on references push $arrayref pop $arrayref shift AL $arrayref T N unshift $arrayref keys I E splice $arrayref M $arrayref P each ER values $arrayref $arrayref EX keys each $hashref values $hashref $hashref perlfunc
  137. built-ins on references perlfunc
  138. built-ins on references sub demo (+$) { perlfunc
  139. built-ins on references sub demo (+$) { my ($x, $y) = @_; perlfunc
  140. built-ins on references sub demo (+$) { my ($x, $y) = @_; # do stuff perlfunc
  141. built-ins on references sub demo (+$) { my ($x, $y) = @_; # do stuff } perlfunc
  142. built-ins on references sub demo (+$) { my ($x, $y) = @_; # do stuff } demo( @array, $n ); perlfunc
  143. built-ins on references sub demo (+$) { my ($x, $y) = @_; # do stuff } demo( @array, $n ); demo(@array, $n ); perlfunc
  144. built-ins on references sub demo (+$) { my ($x, $y) = @_; # do stuff } demo( @array, $n ); demo(@array, $n ); demo( %hash, $n ); perlfunc
  145. built-ins on references sub demo (+$) { my ($x, $y) = @_; # do stuff } demo( @array, $n ); demo(@array, $n ); demo( %hash, $n ); demo(%hash, $n ); perlfunc
  146. Package Blocks package Library::Awesome; our $VERSION = 1.234; sub foo { ... } 1; perlfunc
  147. Package Blocks package Library::Awesome 1.234 { sub foo { ... } } 1; perlfunc
  148. Package Blocks package Library::Awesome 1.234 { sub foo { ... } } 1; perlfunc
  149. Package Blocks package Library::Awesome 0.2-1alpha { sub foo { ... } } 1; perlfunc
  150. Package Blocks package Library::Awesome 1.234; sub foo { ... } 1; perlfunc
  151. Speaking of Packages perlmodlib
  152. Speaking of Packages - Perl 5.14 removed a bunch of modules perlmodlib
  153. Speaking of Packages - Perl 5.14 removed a bunch of modules - ...so there was room to add new ones! perlmodlib
  154. HTTP::Tiny use 5.14.0; use HTTP::Tiny; my $http = HTTP::Tiny->new; my $res = $http->get( $url ); print $res->{content} if $res->{success}; HTTP::Tiny
  155. JSON::PP use JSON::PP; my $data = decode_json( $json_string ); my $json = encode_json( $data_struct ); JSON::PP
  156. JSON::PP
  157. use 5.14.0; JSON::PP
  158. use 5.14.0; use autodie; JSON::PP
  159. use 5.14.0; use autodie; use HTTP::Tiny; JSON::PP
  160. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; JSON::PP
  161. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; JSON::PP
  162. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; JSON::PP
  163. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); JSON::PP
  164. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); die $json->{reason} unless $json->{success}; JSON::PP
  165. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); die $json->{reason} unless $json->{success}; my $dist = decode_json( $json ); JSON::PP
  166. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); die $json->{reason} unless $json->{success}; my $dist = decode_json( $json ); my $tgz = $http->get( $json->{download_url} ); JSON::PP
  167. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); die $json->{reason} unless $json->{success}; my $dist = decode_json( $json ); my $tgz = $http->get( $json->{download_url} ); die $tgz->{reason} unless $tgz->{success}; JSON::PP
  168. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); die $json->{reason} unless $json->{success}; my $dist = decode_json( $json ); my $tgz = $http->get( $json->{download_url} ); die $tgz->{reason} unless $tgz->{success}; open my $fh, ‘>’, $dist->{archive}; JSON::PP
  169. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); die $json->{reason} unless $json->{success}; my $dist = decode_json( $json ); my $tgz = $http->get( $json->{download_url} ); die $tgz->{reason} unless $tgz->{success}; open my $fh, ‘>’, $dist->{archive}; $fh->print( $tgz->{content} ); JSON::PP
  170. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); die $json->{reason} unless $json->{success}; my $dist = decode_json( $json ); my $tgz = $http->get( $json->{download_url} ); die $tgz->{reason} unless $tgz->{success}; open my $fh, ‘>’, $dist->{archive}; $fh->print( $tgz->{content} ); $fh->close; JSON::PP
  171. use 5.14.0; use autodie; use HTTP::Tiny; use JSON::PP; my $moose = ‘http://api.metacpan.org/release/Moose’; my $http = HTTP::Tiny->new; my $json = $http->get( $moose ); die $json->{reason} unless $json->{success}; my $dist = decode_json( $json ); my $tgz = $http->get( $json->{download_url} ); die $tgz->{reason} unless $tgz->{success}; open my $fh, ‘>’, $dist->{archive}; $fh->print( $tgz->{content} ); $fh->close; IO::File
  172. IO::File open my $fh, ‘<’, $some_filename or die “can’t open fh: $!”; print {$fh} “Some output.”; close $fh or die “can’t close fh: $!”; perlopentut
  173. IO::File use 5.10.1; use autodie; open my $fh, ‘>’, $some_filename; print {$fh} “Some output.”; close $fh; autodie
  174. IO::File use 5.10.1; use autodie; use IO::File; open my $fh, ‘>’, $some_filename; $fh->print( “Some output.” ); $fh->close; IO::File
  175. IO::File use 5.14.0; use autodie; use IO::File; open my $fh, ‘>’, $some_filename; $fh->print( “Some output.” ); $fh->close; IO::File
  176. IO::File use 5.14.0; use autodie; open my $fh, ‘>’, $some_filename; $fh->print( “Some output.” ); $fh->close; IO::File
  177. IO::File use 5.14.0; use autodie; open my $fh, ‘>’, $some_filename; $fh->print( “Some output.” ); $fh->close or die “can’t close: $!”; IO::File
  178. $@ perlvar
  179. $@ Try::Tiny
  180. $@ - Well, actually, you use Try::Tiny, right? Try::Tiny
  181. $@ - Well, actually, you use Try::Tiny, right? - But this makes Try::Tiny more reliable, too! Try::Tiny
  182. $@ - Well, actually, you use Try::Tiny, right? - But this makes Try::Tiny more reliable, too! - You see, eval and $@ are totally awful Try::Tiny
  183. use 5.12.0; { package X; sub DESTROY { eval { } } } eval { my $x = bless {} => ‘X’; die “DEATH!!”; }; warn “ERROR: $@”; perlfunc
  184. use 5.12.0; { package X; sub DESTROY { eval { } } } eval { my $x = bless {} => ‘X’; die “DEATH!!”; }; warn “ERROR: $@”; $ perl5.12.4 test.pl ERROR: perlfunc
  185. use 5.14.0; { package X; sub DESTROY { eval { } } } eval { my $x = bless {} => ‘X’; die “DEATH!!”; }; warn “ERROR: $@”; perlfunc
  186. use 5.14.0; { package X; sub DESTROY { eval { } } } eval { my $x = bless {} => ‘X’; die “DEATH!!”; }; warn “ERROR: $@”; $ perl5.14.1 test.pl ERROR: DEATH!! perlfunc
  187. IPv6 Support! Socket
  188. IPv6 Support! - IPv4 is getting pretty old Socket
  189. IPv6 Support! - IPv4 is getting pretty old - not a big deal Socket
  190. IPv6 Support! - IPv4 is getting pretty old - not a big deal - won’t run out of addresses until 2011-04-15 Socket
  191. IPv6 Support! - IPv4 is getting pretty old - not a big deal - won’t run out of addresses until 2011-04-15 - …the future! Socket
  192. More Random Stuff
  193. say “I o{23145} Perl 5.14!”; perlsyn
  194. say “I o{23145} Perl 5.14!”; I Perl 5.14! perlsyn
  195. say “I 23145 Perl 5.14!”; I ?45 Perl 5.14! perlsyn
  196. say “I 023145 Perl 5.14!”; I 145 Perl 5.14! perlsyn
  197. # Pretend there are 15 captures: qr{ (1) (2) (3) (4) 7 10 (5) (6) (7) (8) (9) 7 10 (10) 7 10 }x; perlre
  198. # Pretend there are 15 captures: qr{ (1) (2) (3) (4) o{7} o{10} (5) (6) (7) (8) (9) o{7} o{10} (10) g{7} g{10} }x; perlre
  199. my @hex = (0x0D, 0x0A); my @bin = (0b1101, 0b1010); perlsyn
  200. my @hex = (0x0D, 0x0A); my @bin = (0b1101, 0b1010); my @hex = (0X0D, 0X0A); my @bin = (0B1101, 0B1010); perlsyn
  201. printf “%hhun”, 10; printf “%tun”, 10; printf “%zun”, 10; perlfunc
  202. printf “%hhun”, 10; # char printf “%tun”, 10; # ptrdiff_t printf “%zun”, 10; # size_t perlfunc
  203. 0.0416303447718782 perlfunc
  204. perl -E ‘srand(1); say rand;’ perlfunc
  205. my $seed = srand; perlfunc
  206. http://www.perl.org/get.html
  207. Any questions?
Advertisement