in reply to Byte repetition check
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?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Byte repetition check
by james28909 (Deacon) on Dec 11, 2014 at 04:27 UTC |