http://qs321.pair.com?node_id=1098677


in reply to Re^2: Passing Along Arrays
in thread Passing Along Arrays

Is this an accurate depiction of what you are attempting?

perl -E ' use strict; use warnings; my @projects; push @projects, [ [ "the", "data" ], "key"]; push @projects, [ [ "more", "data" ], "another key"]; for (@projects) { my @data = @{ $_->[0] }; my $key = $_->[1]; say "DATA: @data"; say "KEY: $key"; } '

OUTPUT:

DATA: the data KEY: key DATA: more data KEY: another key

I suggest you print (or use Data::Dumper/Data::Printer on @contents before it is returned and on $_ in the for loop to see what all is going on.