in reply to Byte repetition check

my $count; my $last = ''; while (read(DATA, my $byte, 1)) { ++$count if $byte eq $last; $last = $byte; }