in reply to perlxs help

I have not seen xs for many years, but if I remember correctly, there is no concept of two-dimensional arrays. Declare one-dimensional array of MAX_LEN1*MAX_LEN2 and use arithmetic to transform that index to/from two indices.