Thanks everybody, especially Linda, I hadn't had occasion to use cut (;.) before, and it took me a whole afternoon to decipher everything. I think the docs on this could be enriched a bit, a couple of things still went over my head, maybe I should get a better grasp of gerunds.
I've (almost) got it all sorted now (I think)... Nice "torus-pad" ([:|:{:,]{.)^:2 It always blows me away that whenever I ask a question here, it provides me with reading material for quite a while. J's got to be one of the best community-supported languages anywhere. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm