in reply to Why is my code assigning the last-retrieved value to all elements in my hash?

Use Data::Dumper in the loop to see what $booklist_1 really contains and print out update_id and title

I deleted your database code and substituted $sth->fetchrow() with (rand(),rand()). My output was ok, no repetition of the last element.

  • Comment on Re: Why is my code assigning the last-retrieved value to all elements in my hash?