while (my $key = shift @keys and my $value = shift @values) { $hash{$key} = $value; }