my @rray1 = qw/boy boymonkey boydog/; my @rray2 = qw/girl girlmonkey girldog/; foreach ...(){ //marriage($rray1[i], $rray2[i]); }