in reply to Re^3: Reading binary file byte by byte
in thread Reading binary file byte by byte

read and readline (<>) are buffered, so it's not that bad. If you need Perl-side buffering, the following would be much better:
use constant BLK_SIZE => 64*1024; { open(my $FILE, "file.binary") or die $!; binmode($FILE); while (read($FILE, my $buf, BLK_SIZE)) { for my $byte (unpack('a*', $buf)) { ... } } close $FILE; }