in reply to Re: tcl like 1 loop with two operators
in thread tcl like 1 loop with two operators
E.g., with List::MoreUtils::each_array():
>perl -wMstrict -le "use List::MoreUtils qw(each_array); my @ra = qw(a b c); my $pair_iter = each_array @ra, @{[ qw(x y z) ]}; while (my ($i, $j) = $pair_iter->()) { print qq{$i, $j}; } " a, x b, y c, z
|
|---|