BernieC has asked for the wisdom of the Perl Monks concerning the following question:
when I run it I getmy %dict ; my $dict = "d:/perl/words.short" ; open (my $wds, "<", $dict) or die("Can't open wordlist: $!\n") ; my $words = 0 ; foreach my $wd (<$wds>) { $dict{$wd} = 1 ; } say scalar keys(%dict) ; say "got apple" if exists $dict{apple} ;
D:\Perl>dictest.pl 66384 D:\Perl>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mysterious hash problem
by soonix (Chancellor) on Oct 16, 2023 at 14:26 UTC | |
by BernieC (Pilgrim) on Oct 16, 2023 at 14:37 UTC | |
|
Re: Mysterious hash problem
by dasgar (Priest) on Oct 16, 2023 at 22:16 UTC | |
|
Re: Mysterious hash problem
by leszekdubiel (Scribe) on Oct 27, 2023 at 19:18 UTC |