in reply to Re: Challenge: 8 Letters, Most Words
in thread Challenge: 8 Letters, Most Words
TJPride,
You filtered things out that shouldn't have been (capitalization/punctuation don't matter for instance). Here is the code that I am using to filter my list:
You filtered things out that shouldn't have been (capitalization/punctuation don't matter for instance). Here is the code that I am using to filter my list:
#!/usr/bin/perl use strict; use warnings; my %seen; open(my $fh, '<', '2of12inf.txt') or die "Unable to open '2of12inf.txt +' for reading: $!\n"; while (<$fh>) { chomp; $_ = lc($_); tr/a-z//cd; next if ! $_ || length($_) > 8 || $seen{$_}++; print "$_\n"; }
This should be 100% accurate with any given word list
I will be using the same dictionary with my brute force solution so I will let you know though I won't be filtering out all the words you have.
Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Challenge: 8 Letters, Most Words
by TJPride (Pilgrim) on Oct 04, 2013 at 22:09 UTC | |
by Limbic~Region (Chancellor) on Oct 05, 2013 at 00:17 UTC | |
by choroba (Cardinal) on Oct 05, 2013 at 00:31 UTC | |
by Limbic~Region (Chancellor) on Oct 05, 2013 at 02:53 UTC | |
by LanX (Saint) on Oct 05, 2013 at 00:39 UTC | |
by Limbic~Region (Chancellor) on Oct 05, 2013 at 02:38 UTC | |
by LanX (Saint) on Oct 05, 2013 at 14:51 UTC | |
Re^3: Challenge: 8 Letters, Most Words
by CountZero (Bishop) on Oct 04, 2013 at 21:08 UTC |
In Section
Seekers of Perl Wisdom