No problem if you're not constrained in what Perl version you can use:
use v6; my @male = qw/boy boymonkey boydog/; my @female = qw/girl girlmonkey girldog/; for @male Z @female -> $m, $f { say "$m marries $f"; }
(Works fine in niecza and rakudo).
In reply to Re: how to avoid using index of array
by moritz
in thread how to avoid using index of array
by Achilles_Sea
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |