in reply to how to avoid using index of array

However, I want to use only 1 foreach, or some method without index of array as there is a saying A real perl programmer seldom users indexes, but how?

yes, idiots say a lot of things

use an index

Replies are listed 'Best First'.
Re^2: how to avoid using index of array
by Anonymous Monk on Nov 13, 2011 at 06:00 UTC
    Oh snap, I used an index
    my @rray1 = qw/boy boymonkey boydog/; my @rray2 = qw/girl girlmonkey girldog/; while( my ( $i, $v ) = each @rray1 ){ print " $v => $rray2[$i]\n"; } __END__ boy => girl boymonkey => girlmonkey boydog => girldog