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