The thing about all this is that I'm not a coder and never had been.
This all just started off as using a few lines of perl to add commas into a file to turn it into a csv - and it snowballed from there - resulting in this. I'm now at a point where I'm realising that I need to stop and take stock.
If you look at the datastructures I'm analysing, you can guess what my dayjob is - I don't need to ask my mum! The real question is - which is the right book to buy.