File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -759,6 +759,17 @@ Instead, use a C<NEXT> block within the body of the loop.
759
759
= comment NOTE FOR EDITORS: When adding functions, please place them in
760
760
alphabetical order.
761
761
762
+ = head3 Built-ins with bare blocks
763
+
764
+ Builtins that previously accepted a bare block followed, without
765
+ a comma, by the remainder of the arguments will now
766
+ require a comma between the block and the arguments e.g. C < map > , C < grep > ,
767
+ etc.
768
+
769
+ my @results = grep { $_ eq "bars" } @foo; # Perl 5
770
+ my @results = grep { $_ eq "bars" }, @foo; # Perl 6
771
+
772
+
762
773
= head3 C < delete >
763
774
764
775
Turned into an adverb of the
@@ -783,7 +794,6 @@ and L<C<[]> array subscripting|#[]_Array_indexing/slicing> operators.
783
794
say "element exists" if exists $array[$i]; # Perl 5
784
795
say "element exists" if @array[$i]:exists; # Perl 6 - use :exists adverb
785
796
786
-
787
797
= head2 Regular Expressions ( Regex / Regexp )
788
798
789
799
= head3 Change C < =~ > and C < !~ > to C < ~~ > and C < !~~ > .
You can’t perform that action at this time.
0 commit comments