in reply to Storing unordered data from file in memory
For ease of use, I would just read the whole file into an array and then sort that array by address (which should be identical to sorting it by the elements directly, judging from the format, except for the last row).
Otherwise, if memory becomes a real issue, I would try to reconstruct the memory as a scalar, using substr to write the payload data into the correct location. If the string is too short for the current location, expand the string appropriately.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Storing unordered data from file in memory
by Dirk80 (Pilgrim) on Jul 21, 2010 at 12:58 UTC | |
by toolic (Bishop) on Jul 21, 2010 at 13:21 UTC |