use File::Slurp::Tiny 'read_file'; my @allwords = read_file ($ref);