A list is an ephermeral thing; a transient set of values on the call stack
Ok ... so if, as the docs say, \(@foo) returns a list, then precisely what does [\(@foo)] return ? Is it (something like) "a reference to an array comprising the list returned by \(@foo)" ? (What's the correct terminology ?)
Cheers, Rob
Comment on Re^6: referencing slices - love that DWIM
That's a single scalar value, which is the anonymous array reference containing a list of references to the individual elements of the array @foo. Maybe this will clear it up.
use Data::Dumper qw( Dumper );
my @foo = qw( a b c );
my $x = [ \( @foo ) ];
print Dumper( $x ), "\n";
${ $x->[1] } = 'z';
print join( "\n", @foo ), "\n";
print Dumper( $x ), "\n";