use v5.20;
use experimental 'postderef';
use DDP;
‘a’, ‘b’, ‘c’ .. ‘z’
my $items = [ 'a' .. 'z' ];
a; b; c; d; … x; y; z
say( join '; ', @$items );
say( join '; ', $items->@* ); # same
say $$items[1]; # 'b'
say $items->[1]; # 'b'
say( join ';', @$items[ 2, 3 ] ); # 'b; c'
say( join ';', $items->@[ 2, 3 ] ); # 'b; c'
25
say $items->$#*;
25
say $#$items;
this is postfix slicing.
my %hash_norm = %$items[ 2, 3 ];
same here
my %hash_postdef = $items->%[ 2, 3 ];
{ 2 => ‘c’ , 3 => ‘d’ }
p %hash_norm;
{ 2 => ‘c’ , 3 => ‘d’ }
p %hash_postdef;