Hi,
Thanks for the suggestions re: style - I knew it wasn't very elegant, but want to get the script to run with "use strict" so just pasted in all the "my"s !
I'll go away and modify my code to use a hash as suggested.
Regarding the issue of too many variables, both n2 and C2 unpack to two items each, so there is actually the correct no. of variables. Perhaps it would be clearer to write "n n" and "C C".
Finally, WTF is auto-vivication?? !!
--
Robin Bowes | http://robinbowes.com