Hi, my first advice would be: take a break (honestly). You describe the symptoms of code blindness.
Then, you should listen to what use strict; use warnings; is telling you: Useless use of private variable in void context at yourfile.pl line 30. - that's a starting point. Maybe something is missing there? If your loop does not finish (runs 5 million times), then maybe the end-condition is not met? Why? Is it the condition itself? Is it something with the loop variable? What is the concrete name of the loop variable? Where is it modified? Is it modified during each iteration of the loop?
I hope, that answering theses questions gives you enough of a push - as requested.
Update/comment: By setting $i=0; you already proved you know array indices start at 0. That is not the problem here...
In reply to Re: Sub Routine Malfunction
by Perlbotics
in thread Sub Routine Malfunction
by koolgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |