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() #### shift @words until $words[0] =~ m/$start/; #### shift @words until $words[0] eq $start;