AAAaaaaarrggggghh

It was a typo in $mappingarray which is not spelt $mappingrarray

I've fixed it now - it just goes to show that you can spend all day reading the damn thing and still miss the slippery bugs!

Thanks for looking

David.