in reply to Re^2: Check for next array element.
in thread Check for next array element.

Too easy to make off-by-one mistakes that way. Use for my $i ( 0 .. $#list ) { ... } instead, unless you have speficic reason to use for(;;). (I have never had such an occasion, but maybe you will.)

Makeshifts last the longest.