Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #69 from zoffixznet/fix_typos_in_5to6
Fix typos in 5to6
  • Loading branch information
moritz committed Mar 31, 2015
2 parents 221a53d + ab48f45 commit 0221dca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Language/5to6.pod
Expand Up @@ -398,8 +398,8 @@ Note that in both Perl 5 and Perl 6, the surrounding braces or parens can
often be omitted, though the omission can reduce readability.
In Perl 5, the arrow operator, C«->» , is used for single access to a
composite's reference, or to call a sub through it's reference. In Perl 6,
we now use the dot operator C<.> for those task.
composite's reference or to call a sub through its reference. In Perl 6,
we now use the dot operator C<.> for those tasks.
# Perl 5
say $arrayref->[7];
Expand Down Expand Up @@ -711,7 +711,7 @@ read-write is needed.
for @cars -> $car {...} # Perl 6; read-only
for @cars <-> $car {...} # Perl 6; read-write
If no the default topic C<$_> is being used, but needs to be read-write,
If the default topic C<$_> is being used, but needs to be read-write,
then just use C«<->» and explicitly specify C«$_».
for (@cars) {...} # Perl 5; default topic
Expand Down Expand Up @@ -766,7 +766,7 @@ and L<C<[]> array subscripting|#[]_Array_indexing/slicing> operators.
my $deleted_value = delete $hash{$key}; # Perl 5
my $deleted_value = %hash{$key}:delete; # Perl 6 - use :delete adverb
my $deleted_value = delete $array[$i]; # Perl 5
my $deleted_value = @array[$i]:delete; # Perl 6 - use :delete adverb
Expand All @@ -778,7 +778,7 @@ and L<C<[]> array subscripting|#[]_Array_indexing/slicing> operators.
say "element exists" if exists $hash{$key}; # Perl 5
say "element exists" if %hash{$key}:exists; # Perl 6 - use :exists adverb
say "element exists" if exists $array[$i]; # Perl 5
say "element exists" if @array[$i]:exists; # Perl 6 - use :exists adverb
Expand Down

0 comments on commit 0221dca

Please sign in to comment.