<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 23 November 2014 at 00:26, Gareth France <span dir="ltr"><<a href="mailto:gareth.france@cliftonts.co.uk" target="_blank">gareth.france@cliftonts.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have already been peeking in hex editors. I have picked out 80% of the data and been able to read it into perl (since posting this). However I have noticed some characters which appear to act as boundries between certain fields which are not in the standard ascii set, so I'll have trouble evaluating those in my code, I know how to do it in Quick Basic, I've never tried in perl.<br></blockquote><div><br></div><div>You should be able to treat each byte as a number or use the hexadecimal character representation (e.g. \x00 for a null character). The details in the SO question below may help [1].<br><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The next big problem is that the most important data appears as gibberish. I think I will need to experiment with several data files and look for similarities and differences. I'm getting there though.<span class=""><br></span></blockquote><div><br></div><div>Numerical values will likely be stored as their internal binary representations over several bytes. You may even have more complex structures encoded in there. The Perl unpack method can probably help [2].<br><br></div><div>As you suggest, what you can do is experiment with multiple files. Change one value at a time in the file and see where the difference is. Once you've found the bytes that change, try to read those bytes in a way that returns the value you expect. You will gradually start to see patterns emerge in the file.<br></div><div><br>[1] <a href="http://stackoverflow.com/questions/8920215/how-to-read-binary-file-in-perl">http://stackoverflow.com/questions/8920215/how-to-read-binary-file-in-perl</a><br>[2] <a href="http://perldoc.perl.org/perlpacktut.html">http://perldoc.perl.org/perlpacktut.html</a><br><br></div><div>Bruno<br></div></div><br></div></div>