use strict;
my @a;
my @b = ();
@a = (3, 4);
push @b, [@a];
my @c = @b[0];
print @c;
How do I properly retrieve @c? It tells me Scalar value @b[0] better written as $b[0].
(This isn't my real code for privacy reasons, but in the real code I have something like this:
my @a = @{$b[$i]};
print @a;
This says "Use of uninitialized value," but still prints what it's supposed to.