You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Language/5to6-nutshell.pod6
+12-5Lines changed: 12 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -420,12 +420,15 @@ adverbs.
420
420
421
421
In Perl 5, references to anonymous arrays and hashes and subs are returned
422
422
during their creation. References to existing named variables and subs were
423
-
generated with the C<\> operator. the "referencing/dereferencing" metaphor does not map cleanly to the actual Perl 6 container system, so we will have to focus on the intent of the reference operators instead of the actual syntax.
423
+
generated with the C<\> operator. the "referencing/dereferencing"
424
+
metaphor does not map cleanly to the actual Perl 6 container system,
425
+
so we will have to focus on the intent of the reference operators
426
+
instead of the actual syntax.
424
427
425
428
=forcode :lang<perl5>
426
429
my $aref = \@aaa ; # Perl 5
427
430
428
-
This might be used for passing a reference to a routine, for instance. But in Perl6, the default behavior is a pass by reference.
431
+
This might be used for passing a reference to a routine, for instance. But in Perl6, the default behavior is a pass by reference.
429
432
430
433
=begincode
431
434
my @a = 4,8,15;
@@ -448,9 +451,13 @@ the dot operator C<.> is always used for object methods, but the rest does not r
448
451
say $hashref->{'fire bad'};
449
452
say $subref->($foo, $bar);
450
453
451
-
In recent versions of Perl 5 (5.20 and later), a new feature allows the use of the arrow
454
+
In relatively recent versions of Perl 5 (5.20 and later), a new feature allows the use of the arrow
452
455
operator for dereferencing: see
453
-
L<Postfix Dereferencing|http://search.cpan.org/~shay/perl-5.20.1/pod/perl5200delta.pod#Experimental_Postfix_Dereferencing>. This can be used to create an array from a scalar. This operation is usually called I<decont>, as in decontainerization, and in Perl 6 methods such as C<.list> and C<.hash> are used:
456
+
L<Postfix
457
+
Dereferencing|http://search.cpan.org/~shay/perl-5.20.1/pod/perl5200delta.pod#Experimental_Postfix_Dereferencing>. This
458
+
can be used to create an array from a scalar. This operation is
459
+
usually called I<decont>, as in decontainerization, and in Perl 6
0 commit comments