open (IN,"$filename") || die "Can't open $filename. $!\n"; read (IN,$buf,$numbytes,$startbyte) || die "Read error. $!\n"; close (IN);