in reply to printing multiple arrays in column format??

Off the top of my head, I'd probably do something like this:

while(@array || @array2 || @array3) { printf("%-10s %-10s %-10s\n", shift(@array) || '', shift(@array2) || '', shift(@array3) || '', ); }

You could do something similar, and iterate from 0 to the last index of the longest array, and just print the element at that index, but that would require you to figure out how long the longest array was as well, but that might be easier if you need to keep the contents of the array around after printing them.

Replies are listed 'Best First'.
Re: Re: printing multiple arrays in column format??
by Anonymous Monk on Feb 07, 2003 at 02:48 UTC
    Thanks jasonk

    That's perfect for what I need :)