@The_Almighty_Duelist: I have been thinking about your request while at work today (as well as the comments received before I went to work), and I can and will write an alternative version.
@Aucun50: If you feel the need to add the () around the if statements, be my guest. The script works fine either way.
To all regarding hash tables and memory usage: I have a bot that runs 24/7 on a PIII-600 with 512M ram and a 120G hard drive. This bot contains 10 hash tables. Of those 10, 4 contain between 10,000 and 15,000 entries. The remaining 6 all have under 1,000 entries.
A bit of quick simple math gives a total of about 45,000 - 65,000 entries for all 10 tables. The amount of RAM required to hold all of those entries, is less than 2M.
Now, I realize that the actual memory required will vary depending on the specifics of the hash table name, item and data that are stored, but this gives a general idea of the memory usage for a fair number of tables/entries.
At one point it was noticed that the bot was slowing down, and I checked the hash tables, to find that the tables (at that time) were holding nearly 10x the current settings.