my @a = ('one', 'two', 'three'); my @b = (1, 2, 3); my %h; $h{$_}=shift @b for @a; # Destroys @b - copy that if it needs saving