my @word = map{ $count{$_} || 0 } qw($word); #I think This is where I have gone wring my @count_word = map{ $count{$_} || 0 } qw($count{$word}); # I think This is where I have gone wring #### my @word = keys %count; my @count_word = map{ $count{$_} || 0 } @word;