excitement ... Though i am unsure of how to test this code above, it def looks awesome!
Why not? Its right there in __END__ perl keytable.pl nonworking.file working.file anyother.file
My point like always is abstraction (sub sub sub), so that you can just read what you want following the docs of the format ... no copy/paste read statements when you can ReadBytes
| [reply] [d/l] |
Yeah i did try that, but recieved an error message about expecting $bytes. But never the less, the code i posted works great and pretty quick for what i want to do :)
Thanks for posting this tho, it will definitely show me a different approach to the same problem. Once i get back i will try to run the code above again to see why it wasnt working for me.
Thanks!
EDIT: Yes, just read bytes, the index table will tell you where each infos are inside the file, all i did was predeclare read lengths, and then i use 0x0C to go to the actual data, then use the predefined read lengths. I will work on this more soon and post a follow up code (which should be alot shorter that my original code).
| [reply] |
Yeah i did try that, but recieved an error message about expecting $bytes. Well, you won't get that with the files you posted :) which are small enough to post on perlmonks with Data::Dump::dd() )
But croaking is there to help; for some reason program couldn't read from the file (past the end?) , so program might as well stop instead of making stuff up and generating a bunch of warnings
| [reply] |