In this code, it should match "1" 2 times, "2" 2 times, and "3" 3 times, which would be a total of 7 repeating bytes. The script only counts 5 repeating bytes. What am I missing? I know its something simple probably. Any help would be appreciated :)
You are smart matching a byte against an array.
So, step through the ten iterations of your loop on paper, recording the changes to @array and $count, and it will be very clear to you where you are going wrong.
(You also appear to have a newline character as the first line of your file, which probably isn't meant to be there?)
In reply to Re: Byte repetition check
by BrowserUk
in thread Byte repetition check
by james28909
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |