in reply to
Re: Re: Re: DB_File, not saving
in thread DB_File, not saving
I don't think he wants to start fresh each time. He wants to save the data so he can display more than one line.
It looks like a CGI script that wants to accept a line of chat, then display the previous 10 lines. What it actually does is this:
- deletes all previous messages
- creates the db file, ties %chat
- unties %chat, thereby not storing any messages
- accepts a new message
- displays the last 10 messages (which were just deleted!)
Not only is the %chat untied from the the DB_File when it's tied to TIE::IxHash (as you pointed out), the script is deleting the DB_File every time it is hit.