I see you ran this from the command line didn't you, I tried as a seperate script initially I just tried typing it all in now I am down to one error unable to find string terminator but I am not sure where the problem is, I am really impressed with your example though, I wish I had as deep an understanding and command of the language as you possess. :)
my error is can't find string terminator "'" anywhere before eof at -e line 1
Doh single versus double quotes..
ok now it does run but all it outputs is 6 followed by 9 comma's then 7 followed by 9 comma's I don't understand why its not showing all of it.