That one is interesting to watch behind the scenes. You start out with a simple array. Each time you rotate it either

1) There is some spare room in the space allocated for the array and an item is moved into that space and Perl notes that the real array is really further down in that block of space than it used to be

or

2) There isn't any space left in which case a larger space is allocated for the array and the array is placed at the front of that new bigger space.

So the "offset" to finding the first entry will progress something like (from a real run using Devel::Peek):
0, 1, 0, 1, 2, ..., 8, 0, 1, 2, ..., 25, 0, ...

while the space for the array slowly grows without bound (it appears).

Update: Sounds like I stopped experimenting just a bit too soon. Good thing I covered my butt with that "it appears" on the end. (:

        - tye (but my friends call me "Tye")

In reply to (tye)Re2: alternating row colors by tye
in thread alternating row colors by qball

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.