in reply to printing unequal sized lists side by side

Using a basic loop and List::Util. Most of the additional code is there for simple formatting.

use List::Util qw(max); use warnings; use strict; my @array1 = (1..5, 10); my @array2 = ('a'..'h'); my $length = max map {length} @array1; for my $i (0..max($#array1, $#array2)) { printf "% ${length}s %s\n", $array1[$i] // '', $array2[$i] // ''; } __END__ 1 a 2 b 3 c 4 d 5 e 10 f g h