in reply to Mysterious hash problem
Maybe you could do it simpler:
use Path::Tiny; my %dict = map { ($_, 1) } path("d:/perl/words.short")->lines_utf8({chomp => 1}); say "got apple" if exists $dict{apple} ; [download]