@@ -533,7 +533,7 @@ Unchanged:
533
533
= item C « == != < > <= >= » Numeric comparisons
534
534
= item C < eq ne lt gt le ge > String comparisons
535
535
536
- = head2 C < , > (Comma) List Separator
536
+ = head2 C < , > (Comma) List separator
537
537
538
538
Unchanged, but note that in order to flatten an array variable to a list (in
539
539
order to append or prefix more items) one should use the C < | > operator
@@ -568,8 +568,8 @@ depend on the types of both arguments, and those rules are far from
568
568
identical in Perl 5 and Perl 6. See L < ~~|/routine/~~ > and
569
569
L < the smartmatch operator|/language/operators#index-entry-smartmatch_operator >
570
570
571
- = head2 C < & | ^ > String Bitwise ops
572
- = head2 C < & | ^ > Numeric Bitwise ops
571
+ = head2 C < & | ^ > String bitwise ops
572
+ = head2 C < & | ^ > Numeric bitwise ops
573
573
= head2 C < & | ^ > Boolean ops
574
574
575
575
In Perl 5, C < & | ^ > were invoked according to the contents of their
@@ -665,7 +665,7 @@ my $result = $score > 60 ? 'Pass' : 'Fail'; # Perl 5
665
665
= for code :preamble<my $score>
666
666
my $result = $score > 60 ?? 'Pass' !! 'Fail'; # Perl 6
667
667
668
- = head2 C < . > (Dot) String Concatenation
668
+ = head2 C < . > (Dot) String concatenation
669
669
670
670
Replaced by the tilde.
671
671
@@ -676,7 +676,7 @@ $food = 'grape' . 'fruit'; # Perl 5
676
676
= for code :preamble<no strict;>
677
677
$food = 'grape' ~ 'fruit'; # Perl 6
678
678
679
- = head2 C < x > List Repetition or String Repetition operator
679
+ = head2 C < x > List repetition or string repetition operator
680
680
681
681
In Perl 5, C < x > is the Repetition operator, which behaves differently in
682
682
scalar or list contexts:
@@ -702,7 +702,7 @@ Mnemonic: C<x> is short and C<xx> is long, so C<xx> is the one used for lists.
702
702
@ones = 5 xx @ones; # Parentheses no longer needed
703
703
704
704
705
- = head2 C < .. > C < ... > Two Dots or Three Dots, Range op or Flipflop op
705
+ = head2 C < .. > C < ... > Two dots or three dots, range op or flipflop op
706
706
707
707
In Perl 5, C < .. > was one of two completely different operators, depending
708
708
on context.
@@ -719,7 +719,7 @@ In Perl 5, C<"${foo}s"> deliminates a variable name from regular text next to
719
719
it. In Perl 6, simply extend the curly braces to include the sigil too:
720
720
C < "{$foo}s" > . This is in fact a very simple case of interpolating an expression.
721
721
722
- = head1 Compound Statements
722
+ = head1 Compound statements
723
723
724
724
These statements include conditionals and loops.
725
725
@@ -907,7 +907,7 @@ while (my ($k, $v) = each(%hash)) { ... } # Perl 5
907
907
= for code :preamble<no strict;>
908
908
for %hash.kv -> $k, $v { ... } # Perl 6
909
909
910
- = head2 Flow Control statements
910
+ = head2 Flow control statements
911
911
912
912
Unchanged:
913
913
@@ -1005,7 +1005,7 @@ say "element exists" if exists $array[$i]; # Perl 5
1005
1005
= for code :preamble<no strict;>
1006
1006
say "element exists" if @array[$i]:exists; # Perl 6 - use :exists adverb
1007
1007
1008
- = head1 Regular Expressions ( Regex / Regexp )
1008
+ = head1 Regular expressions ( regex / regexp )
1009
1009
1010
1010
= head2 Change C < =~ > and C < !~ > to C < ~~ > and C < !~~ > .
1011
1011
0 commit comments