in reply to Reading Hex file data

What do you mean by a hex file? Do you mean a binary file? If that is the case then look at open and binmode.

Assuming we are dealing with binary data here, not text, you will have to convert the binary into Perl format using unpack. You will need the exact format of the data (this is sometimes the hardest part).

To jump to another location in the file you will need seek.

Replies are listed 'Best First'.
Re^2: Reading Hex file data
by biohisham (Priest) on Aug 20, 2010 at 10:25 UTC
    you will have to convert the binary into Perl format

    Are you talking about fixed-width data manipulation or are you talking about the use of pack and unpack to convert between data types?, While the OP hasn't provided any sample input or output we're left to assume things but I am confused by what you meant when you said "Perl format" ....


    Excellence is an Endeavor of Persistence. A Year-Old Monk :D .
      Perl's representation of a number (scalar) rather than the machine representation (which Perl can't manipulate).