I think the OP is probably ok here.
He is using arrays in a "non-Perl" way and with explicit indices starting at 1 instead of 0. Not using
array[0] is allowed.
$kpi[0] is probably undef.
"Off by one" is one of the most common errors in programming. I personally would rewrite the code so that it doesn't use indices at all like: foreach my $element (@array){} However a re-write like appears to be outside the scope of the question before us. Perl code like that would use index 0.
However there would not be any direct reference to that zero index within the code at all. Creating the kpi array would use "push" instead of explicit indices from 1..n. If the OP creates the kpi array with starting with $kpi[1] that just makes index 0 undef (skips it). I don't see any indication that the OP is aware of: push,pop,shift,unshift.