That's not in the bug in the sense that it results in incorrect behavior. Minor quibble aside - you are right that it does not belong. It's left over from a previous revisions. The original version I had was much closer to blokhead
's code which does not precalulate stop values and ends up spinning cycles doing math every iteration. Next I reversed the array so the index could be used to determine stop value with less math. This was unfortunate because I still had to do some
reverse the return. Finally, I realized I could precalulate the stop values but didn't do a good job of cleaning up my false starts.
Thanks for the analysis - glad to have been some help.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||