in reply to Re: Comparing numbers
in thread Comparing numbers

 @index = ($i-1,$i);

That's cute. My natural inclination would have been to keep just the index of the larger of the winning pair of consecutive numbers ($i). However, it costs very little to put the indices of both numbers aside and use them later to display the slice of interest from the array. :-)