my %missing-words = %book-words - %dictionary; #### my %missing = map { $_ => 1 } grep { ! exists $dict{ $_ } } keys %book;