in reply to problem with perl "for" loop

It's a warning, not an error.
$hold[$left+1]   will eventually become bigger than the index of the array's last element.

Sören