Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
De-emphasize references vs containerized objects
  • Loading branch information
lizmat committed Jun 12, 2018
1 parent 80a4f64 commit ba87ed3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions doc/Language/5to6-perlop.pod6
Expand Up @@ -69,11 +69,15 @@ for bitwise integer negation. Assumes two's complement.
C<+> I<does> have an effect in Perl 6, coercing its argument to the
Numeric type.
Unary C<\> is no more. If you really want to take a reference to an existing
Unary C<\> is no more. If you really want to take a "reference" to an existing
named variable, you can use item context, like so: C<$aref = item(@array)>, or
maybe more familiarly: C<$aref = $@array>. You can get a reference to a named
subroutine by using the C<&> sigil: C<$sref = &foo>. Anonymous arrays, hashes,i
and subs return their references during creation I<right away>: C<$sref = sub { }>.
maybe more familiarly by prefixing with a C<$>: C<$aref = $@array>. Please
note that you're not really getting a reference, but a scalar container with
the referenced object in it.
You can get a "reference" to a named subroutine by using the C<&> sigil:
C<$sref = &foo>. Anonymous arrays, hashes, and subs return the underlying
object during creation I<right away>: C<$sref = sub { }>.
=head2 Binding Operators
Expand Down

0 comments on commit ba87ed3

Please sign in to comment.