my %hash; for my $i (0 .. $#fname) { $hash{ "$fname[$i] $lname[$i]" } = $state[$i]; }