More consistent syntax
Perl 5: sigils could "change" based on the operation:
@a = ( 'alice', 'bob', 'carol' ); $first = $a[0]; # note "$a"
Perl 6: sigils are invariant
@a = ( 'alice', 'bob', 'carol' ); $first = @a[0]; # note "@a"
Perl 6 | Perl 6 | #10 |
Perl 5: sigils could "change" based on the operation:
@a = ( 'alice', 'bob', 'carol' ); $first = $a[0]; # note "$a"
Perl 6: sigils are invariant
@a = ( 'alice', 'bob', 'carol' ); $first = @a[0]; # note "@a"
Copyright © 2008 Patrick Michaud |