If your string above is EXACTLY what you're typing, you need to re-look at ReadValue() - Between the ReadValue($subkey,$entry) -- you're missing a comma.

Edit: Thanx for the clarification NTDOC