in reply to Re: Storing unordered data from file in memory
in thread Storing unordered data from file in memory

Good solution. You chose the way to store everything in a hash. I like this way. But of course you load the complete file into memory. But if you have enough memory I think it is a very good way.

UPDATE:

Untested: But I think the data is hex-ascii. So I think that the unpack command should use '(H2)*' instead of '(A2)*'.

  • Comment on Re^2: Storing unordered data from file in memory

Replies are listed 'Best First'.
Re^3: Storing unordered data from file in memory
by AnomalousMonk (Archbishop) on Jul 21, 2010 at 21:02 UTC

    No. See Intel HEX in perlpacktut for examples. (Also: See code by other respondents! Update: Actually, now I look, I don't see any such examples.)

Re^3: Storing unordered data from file in memory
by Mr. Muskrat (Canon) on Jul 22, 2010 at 20:37 UTC

    Untested: But I think the data is hex-ascii. So I think that the unpack command should use '(H2)*' instead of '(A2)*'.

    Only if you want it in binary. For my purposes, I prefer to keep it in hex until I get one of two specific addresses and then convert their data. This allows me to view the data without corrupting my terminal settings.