I m currently studying the PE structure. I am trying to parse this using perl instead of C.
This is not an important thing, but if you read a binary file, you have to jump to a certain section. (For example, to read e_lfanew)
I want to read the data at the point 0x78, which is read by $buf with 0x200 data.
Here are two ways I thought to extract the data at 0x78.
my ($ dummy, $ data) = unpack ("A0x78 A*", $buf);
or
seek (F, 0x78,0); read F, $buf, 0x200; print ~
I want to know which of the two methods is more effective than subtracting dummy data and reading data and reading new data through seek.