in reply to Byte-level file inspection?
This will be a big win on especially large files.my $bytepos = shift || die "must supply bytepos"; my $offset = 4; my $startpos = $bytepos - $offset; $startpos = 0 if $startpos < 0; seek(F, $startpos, 0) or die "Can't seek: $!"; read(F, $chunk, $offset * 2) or die "Can't read: $!";
|
|---|