This code doesn't give a syntax error with perl 5.10, but will with any earlier version. Perhaps it would be better if you copy & pasted the error message.
That said, I have a couple of guesses:
You are really running 5.10, aren't you?
You've capitalised "Comment", but not "addr" and "name". Is that correct?