my $string = q(one tow three four five six); my @words = split(/ /, $string); #### my @words= qw(one tow three four five six); #### $hash1{$words[0]}= { $words[1] => join(' ', @word[2..$#words]) };