Okay, I am using Text::Ispell and coming across what may be
a bug, but I want to try the code, catch it, and handle it
without quitting prematurely. Lovers and users hate it when
you quit prematurely.
Anyway...... Here is my code (or at least part of it):
# add words to the dictionary, if desired by the user
# logging only, not adding any words to dictionary if option s
print "Do you wish to add [ $_ ] to the directory [ y|n ]?
$add = <STDIN>;
if ($add eq 'y')
# this does print
print "ERROR: $!\n";
print "adding word: $_\n";
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.
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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||