Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created April 3, 2015 16:30
Show Gist options
  • Save zoffixznet/68519c223cdd208ce7ac to your computer and use it in GitHub Desktop.
Save zoffixznet/68519c223cdd208ce7ac to your computer and use it in GitHub Desktop.
zoffix@ZofMain:~/Desktop/CPANPRC/doc$ gd
diff --git a/lib/Language/5to6.pod b/lib/Language/5to6.pod
index 9498dc1..0d7176a 100644
--- a/lib/Language/5to6.pod
+++ b/lib/Language/5to6.pod
@@ -759,6 +759,17 @@ Instead, use a C<NEXT> block within the body of the loop.
=comment NOTE FOR EDITORS: When adding functions, please place them in
alphabetical order.
+=head3 Built-ins with bare blocks
+
+Builtins that previously accepted a bare block followed, without
+a comma, by the remainder of the arguments will now
+require a comma between the block and the arguments e.g. C<map>, C<grep>,
+etc.
+
+ my @results = grep { $_ eq "bars" } @foo; # Perl 5
+ my @results = grep { $_ eq "bars" }, @foo; # Perl 6
+
+
=head3 C<delete>
Turned into an adverb of the
@@ -783,7 +794,6 @@ and L<C<[]> array subscripting|#[]_Array_indexing/slicing> operators.
say "element exists" if exists $array[$i]; # Perl 5
say "element exists" if @array[$i]:exists; # Perl 6 - use :exists adverb
-
=head2 Regular Expressions ( Regex / Regexp )
=head3 Change C<=~> and C<!~> to C<~~> and C<!~~> .
zoffix@ZofMain:~/Desktop/CPANPRC/doc$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment