in reply to Re: Why is my code assigning the last-retrieved value to all elements in my hash?
in thread Why is my code assigning the last-retrieved value to all elements in my hash?
With all due respect to Kyle, I don't believe it has anything at all to do with using "1".
It's not "1" specifically that's the problem. The problem is using any particular static string for every book ID. You had the same problem using "ok" instead of "1". You'd have the same problem using "this_will_work_for_sure" or a million other things. It's also a problem you wouldn't have if you'd use strict because it won't allow you to use a string as a reference.
|
|---|