jonjacobmoon has asked for the wisdom of the Perl Monks concerning the following question:
Anyway...... Here is my code (or at least part of it):
# add words to the dictionary, if desired by the user foreach (@misses) { # logging only, not adding any words to dictionary if option s +et unless ($opts{terse}) { unless ($noRepAdds{$_}) { print "Do you wish to add [ $_ ] to the directory [ y|n ]? + "; $add = <STDIN>; chomp($add); if ($add eq 'y') { add_word($_); if ($!) { # this does print print "ERROR: $!\n"; } save_dictionary(); print "adding word: $_\n"; $noRepAdds{$_}++; } } } }
When I run across a problem adding to the dictionary, I get an error reflected in $! and then when I go to add another word, the program quits with the following message:
Do you wish to add nis2002 to the directory? y adding word: nis2002 Do you wish to add nbsp to the directory? Invalid word "nis2002": The +character '2' may not appear at the middle of a word. y Broken pipe
First, off ispell on the command line has no problem with nis2002 nor should it according to the documentation, so my guess is the Text::Ispell has a bug in it, although I could not find it. Still, there has to be a way to try and catch this exception.
Any ideas would be most helpful, I have been struggling with this minor bug for three days with no end in sight.
I admit it, I am Paco.
Edit by tye to change PRE to CODE around long lines
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Ispell did it in my code with a broken pipe, anyone got a clue?
by chipmunk (Parson) on Feb 13, 2002 at 02:59 UTC | |
by jonjacobmoon (Pilgrim) on Feb 13, 2002 at 03:38 UTC | |
Re: Ispell did it in my code with a broken pipe, anyone got a clue?
by Rhandom (Curate) on Feb 12, 2002 at 19:46 UTC | |
Re: Ispell did it in my code with a broken pipe, anyone got a clue?
by theorbtwo (Prior) on Feb 12, 2002 at 20:44 UTC | |
by jonjacobmoon (Pilgrim) on Feb 12, 2002 at 21:15 UTC | |
Re: Ispell did it in my code with a broken pipe, anyone got a clue?
by little (Curate) on Feb 13, 2002 at 02:39 UTC |