warning on first if line.
Errors in a statement can appear to originate on the first line of the statement. That means the warning can be (and is) issued by the elsif condition.
I already told you how to fix it (3rd item). It occurs when the last element of @bin is a one and you peek past then end of the array.
In reply to Re^5: length of 1's
by ikegami
in thread length of 1's
by coldy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |