in reply to database not storing data

Maybe I am missing something, but the only key you seem to use with the hash %dbase is "word". The string "word", not the contents of the $word variable. If all you want to do is to store the last processed word, it's not necessary to use a tied hash. Anyway if you do want to keep it and make sure the word does get stored in the file you have to flush it.

my $dbase_obj = tie (%dbase, 'DB_File', $dbase, O_CREAT|O_RDWR, 0644) || die "Died tying database\nReason: $!\n"; ... $dbase{word} = $word; $dbase_obj->sync()

Also please do NOT enclose variables in doublequotes, unless you do need to stringify a reference or something like that. "$variable" is almost always better written as $variable. If you are lucky, the doublequotes will just slow the script down, if not they will break it!

And there is another problem, the

shift @words until $words[0] =~ m/$start/;
looks for the first word that CONTAINS the last processed word. I don't think that's what you meant. I think you wanted this:
shift @words until $words[0] eq $start;

BTW, it's a shame some people don't agree with your sig. Well, to hell with some people! It's a shame my Squirrel thinks age does have some importance :-(

Jenda
XML sucks. Badly. SOAP on the other hand is the most powerfull vacuum pump ever invented.