thraxil: Still have to test, but this looks good. I've recoded, as suggested, to move most of the code outside the loop.
perlplexer: There are indeed commas in the data so I plan to change the 'seperator' to '::'. But I'll certainly take a look at the 2 links you provided