Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Built-ins with comma-less blocks now require a comma
  • Loading branch information
zoffixznet committed Apr 3, 2015
1 parent 4856456 commit e5f11c2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/Language/5to6.pod
Expand Up @@ -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
Expand All @@ -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<!~~> .
Expand Down

0 comments on commit e5f11c2

Please sign in to comment.