in reply to Foreach two arrays?

while (@a || @b) {print shift @a,shift @b}
Insta-update - alas, alas, too slow. How about this, if they're always the same length:
for(@a){print$_,$b[$0];$0++}


§ George Sherston

Replies are listed 'Best First'.
Re: Re: Foreach two arrays?
by larryk (Friar) on Sep 06, 2001 at 12:34 UTC
    how about
    print$_,$b[$0++]for@a
    ;)
       larryk                                          
    perl -le "s,,reverse killer,e,y,rifle,lycra,,print"