http://qs1969.pair.com?node_id=1054143


in reply to Parallel processing two arrays with different numbers of elements

Another possibility, using defined or instead of disabling warnings.

use v5.16; use warnings; my @arr=qw/a b c d e/; my @bar = qw/12 34 56/; my $i = 0; while ($i<($#arr+2)) { say "\t \$i: $i"; say "\t\t ", $arr[$i] // q{}, ", ", $bar[$i] // q{}; ++$i; }