Something like:
@foo = (1,2,3);@bar=(4,5,6,7); while (@foo || @bar) { print "$foo[0]\t$bar[0]\n"; shift @foo; shift @bar; }
Updated: Note that this solution does not require padding or modules. If you need the original arrays preserved, make copies.
In reply to Re: printing arrays
by idsfa
in thread printing arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |