in reply to Re: Looping backwards through two arrays at once?
in thread Looping backwards through two arrays at once?
If you want to do it this way, shouldn't it be
for(0..$#array1) { print $array1[$#array1 - $_]; print $array2[$#array2 - $_]; }
EDIT: Oops, you fixed the array index. But you still have your $# reversed on two lines. :)
|
---|
In Section
Seekers of Perl Wisdom