use strict; use warnings; my @KPI = (10, 20, 30, 40, 50); for (my $i = 0; $i < @KPI; $i++) { print "line", $KPI[$i], "\n"; }