in reply to Re^2: Iterate multiple arrays with added text
in thread Iterate multiple arrays with added text

It's actually all three generating the warning.

What you need is:

for my $i (0 .. $#titles){ ... }

Note the $#titles as opposed to @titles. You're essentially causing an off-by-one issue by using the array count as opposed to the element position (index). Example:

perl -wMstrict -E 'my @x=(qw(a b c)); say "$_: $x[$_]" for (0..@x)' 0: a 1: b 2: c Use of uninitialized value in concatenation (.) or string at -e line 1 +. 3:

vs:

perl -wMstrict -E 'my @x=(qw(a b c)); say "$_: $x[$_]" for (0..$#x)' 0: a 1: b 2: c