for my $name ( @names_combined ) { push @{$emails{$name}}, shift(@emails_combined); }