Bah! This is so ridiculous, I retyped the code when I was posting the question and ended up typing the code correctly!!
The code was originally like this:
How do you usually figure the code for a hash traversal? I kept having to restart my webapp, Do you usually use the debugger and inspect the hash? I guess I really have to get used to the command line debugger
Thanks so much for your replies dear monks! Sorry about the trouble! This is another pretty silly issue.