OK, yes I understand your valid points.
Here is a little history: when I originally asked you the question I was facing a problem on retrieving data from a large file whose record structure information was stored in an index file. At that time the structure of the index file was sequential that is the next record was always starting right after the end of the prior record, so no offset was actually involved. The code you supplied was perfectly doing the retrieval by sequentially picking up chunks from the big file.
Now the structure of the big file has been changed by the vendor and there is extraneous data in between each record for which I have to make use of the offset information each time before I can get the record I am interested in.
I understand your surprise and the disappointment for my ignorance, I can only say I wish I had more time to dedicate to the discovery of Perl abilities .....
Thanks for all you did