in reply to database not storing data

I'm a little baffled about your "dictionary.txt" file. You say it is large, but you read it like this:
open(DICT, $dict) or die "Cannot open $dict because $!"; my $words = <DICT>; my @words = split(/ /, $words); close(DICT) or die "Cannot close $dict because $!";
Normally, I'd assume that a "dictionary.txt" file would have a line-feed (or CRLF, depending on how the file was created) at the end of each word, rather than a space; this makes it easier to know how many words are present, and to add or remove words -- because counting lines is easy, and adding or (de)selecting lines is easier than adding or (de)selecting words within a single, very long line). But these issues might not be important to you, and you can do it whatever way suits you.

Just curious: is there a line-feed (or CRLF) at the end of that text file? If so, you don't seem to be doing anything about it (it remains attached to the end of the last word), and maybe this is affecting how that last word in the list is being handled when you put it into the submit_form request.

Replies are listed 'Best First'.
Re^2: database not storing data
by sulfericacid (Deacon) on Oct 29, 2005 at 20:17 UTC
    Actually this was a free dictionary file from http://www.orchy.com/dictionary/. (with all the first part cropped out, though). So it is space separated data and not line-fed.

    I'm not so sure about the end of the file though I doubt that's the problem because it's only testing the first 5-10 of this 150k word file. It never gets close to the end of the dictionary.

    Thank you.



    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid