Hi Monks,
I have 2 arrays. The guys in @rray1 are going to marry girls in @rray2 by the right order.
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?
my @rray1 = qw/boy boymonkey boydog/; my @rray2 = qw/girl girlmonkey girldog/; foreach ...(){ //marriage($rray1[i], $rray2[i]); }
In reply to how to avoid using index of array by Achilles_Sea
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |