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


in reply to Merging an array into an AoH

If you don't mind throwing away @results, you could do

$_->{id} = shift @results for @box;

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail