http://www.perlmonks.org?node_id=355447

neniro has asked for the wisdom of the Perl Monks concerning the following question:

I've already got a solution for this problem, but I'm still thinking about different way to do it (using map)?
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $box = [ { id => 'q01' }, { id => 'q02' }, { id => 'q03' }, ]; my @results = qw ( foo bar buz ); my $i = 0; for (@$box) { $_->{value} = $results[$i++]; } print Dumper($box);