in reply to Re: Array mysteriously growing
in thread Array mysteriously growing

Depending what appears more natural to you, you can also check this as

if $i < $#$ordered_list;

Replies are listed 'Best First'.
Re^3: Array mysteriously growing
by duff (Parson) on Mar 10, 2006 at 00:57 UTC

    Aye. I prefer the way I did it because it uses $i+1 in both places.