in reply to Hex value 1A terminates <>

That's an EOF character. Don't they teach control codes in school anymore? Oh, for the days when every computing book had a basic ASCII guide in the back.
anyway, I believe that you'll have to treat your source file as a binary, and use, e.g., read and seek on them.
No coffee, too early, mumble mumble, binmode, mumble mumble.