in reply to tcl like 1 loop with two operators

Not natively. I would write that as:
foreach my $fred ([1, 3], [2, 4]) { my($i, $j) = @$fred; say $i; say $j; }

Replies are listed 'Best First'.
Re^2: tcl like 1 loop with two operators
by Mask (Pilgrim) on Jan 25, 2011 at 15:14 UTC
    Or in case if arrays with $i and $j values are predefined, I would write it like that:
    my @i=(1,2); my @j=(3,4); my @a = map {[$i[$_],$j[$_]]} 0..$#i; foreach my $ij (@a){ my ($i, $j) = @{$ij}; say $i; say $j; }
    OR if it's necessary to emulate TCL behaviour for different lengths of arrays with $i and $j values, I would write it like that:
    my @i=(1,2); my @j=(3,4,5); my @len = sort(scalar(@i),scalar(@j)); my @a = map {[$i[$_],$j[$_]]} 0..$len[-1]; foreach my $ij (@a){ my ($i, $j) = @{$ij}; print $i."\n"; print $j."\n"; }