hi there,
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.
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";
please give me suggestion why the error is coming..
Thanks..