(just don't decode your strings, and you'll have bytes... pretty much)$ perl -0777 -nE ' my $count = 0; $count += length $2 while /(.)(\1+)/g; say $count; ' <<< "1112223333" 7 $ perldoc perlop | perl -0777 -nE ' my $count = 0; $count += length $2 while /(.)(\1+)/g; say $count; ' 22788
In reply to Re: Byte repetition check
by Anonymous Monk
in thread Byte repetition check
by james28909
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |