my @array = @{ sub_returning_aref() };
To get the actual reference, no dereferencing is needed:
my $aref = sub_returning_aref();
On the other hand, if a subroutine returns a list, you can assign it directly to an array:
my @array = sub_returning_list();
To create an array reference, you need to create an anonymous array, as the subroutine returns a list, not an array.
my $aref = [ sub_returning_list() ];
There's nothing special about keys.
my @array = keys %hash;
my $aref = [ keys %hash ];
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
|