my %hash = map { my ($k, @v) = split /\s+/; $k => \@v } @array;