while (my $line2 = <$fhtwo>) { my ($key,@attributes) = split $line2; $hash{$key} = [@attributes]; }