in reply to Array of arrays

You're printing a value from $AoA[5] every time through the loop, but @AoA doesn't have anything at index 5 until you've gone through the loop 6 times and pushed 6 array refs onto @AoA.

By the way, on this line:     @tmp=split(0..7); I think you meant: @tmp = (split)[0..7]; But that may just be a typo from transcribing the code into the textarea here.