in reply to Re: Re: Printing out multiple array lists and more!
in thread Printing out multiple array lists and more!

In my original code (which does not work for the test data :() I detected the end of the looping by testing to see if any of the arrays where still defined (had contents). Since I needed to pull the next number off the list to display it, I just combined a few operations from
if ($a[0]==$i) { printf "%5s",$a[0]; shift @a; }
into the code you see. Oh, and I used scalar probably without need, but I wanted to make sure that the shift statement didn't pull off more than one element.