The part you quote and say I should change is the dump from Data::Dumper, the code is above that.
I do really need help with this one, I worked on it all last night, but I think it is just something that I don't know and need to be pointed in the right direction.