sarvan has asked for the wisdom of the Perl Monks concerning the following question:
I installed cpan module Text::Spellchecker and all its dependencies properly. Installation was successful.
But, when i tried to run the synopsis code they hv given in cpan it given me the following error
<err> Can't call method "check" on an undefined value at /usr/local/share/perl/5.10.1/Text/SpellChecker.pm line 263.please give me suggestion why the error is coming.. Thanks..use strict; use warnings; use Text::SpellChecker; ($Text::SpellChecker::pre_hl_word, $Text::SpellChecker::post_hl_word) = (qw([ ])); my $checker = Text::SpellChecker->new(text => "Foor score and seve +n yeers ago"); while (my $word = $checker->next_word) { print $checker->highlighted_text, "\n", "$word : ", (join "\t", @{$checker->suggestions}), "\nChoose a new word : "; chomp (my $new_word = <STDIN>); $checker->replace(new_word => $new_word) if $new_word; } print "New text : ".$checker->text."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Text-SpellChecker error
by toolic (Bishop) on Jun 23, 2011 at 17:58 UTC | |
|
Re: Text-SpellChecker error
by davido (Cardinal) on Jun 23, 2011 at 19:04 UTC | |
|
Re: Text-SpellChecker error
by bduggan (Pilgrim) on Jun 23, 2011 at 19:44 UTC | |
by Tux (Canon) on Jun 24, 2011 at 06:36 UTC | |
by bduggan (Pilgrim) on Jun 24, 2011 at 13:44 UTC | |
by toolic (Bishop) on Jun 24, 2011 at 14:50 UTC |