in reply to Re^2: Darn Hash refs
in thread Darn Hash refs

That start element you are processing doesn't have a "name" attribute, so $token->[2]{name} is undefined.