#!/usr/bin/perl use 5.016; use warnings; # Parallel processing of two arrays with different numbers of elements my @arr=qw/a b c d e/; my @bar = qw/12 34 56/; my $i = 0; while ($i<($#arr+2)) { no warnings 'uninitialized'; say "\t \$i: $i"; say "\t\t $arr[$i], $bar[$i]"; ++$i; }