Abigailuse Lingua::EN::Inflect qw /PL/; sub preprocess { my $file = shift; open my $fh => $file or die "Failed to open $file: $!\n"; local $_; LINE: while (<$fh>) { chomp; $_ = lc; next if /[^a-z]/; WORD: foreach ($_, PL ($_)) { $valid {$_} = 1; while (length) { next WORD if $prefix {$_} ++; chop; } } } }
In reply to Re: Depth First Search and Boggle
by Abigail-II
in thread Depth First Search and Boggle
by smgfc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |