# Perl 5: print join "...", map {...} sort {...} @array; # Perl 6: say (@array.sort:{...} ==> map {...}).join("..."); #### class Foo { has $.x; # Explicitly generate an accessor: method x() is rw { return new Proxy: FETCH => {...}, STORE => {...}; } } class Foo::Bar isa Foo { method do_sth { ...; my $var = $.x; # Although used as an variable, the *method* Foo.x is called. # Foo::Bar does *not* directly access the variable. } }