in reply to Re^3: Reading binary file byte by byte
in thread Reading binary file byte by byte
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; }
|
|---|