might i add my opinion here? you could manually read the file $bytes at a time and then store the data into a variable... its what i do with some files. take for instance in some files i work with, you read 8 bytes store into variable, read 8 more bytes and store into a different variable, then read 16 bytes and store that in a seperate variable. then you can call the variable at any time you need it. though i do not know if that would be best for this scenario, but if the file is aligned exactly the same throughout the file, you can just set it up top read bytes at a time. hope this helps :)

if you need example script id be more than glad to give if needed.

hope this is helpful and not off topic :)>

i do alot of work with header information, particularly ps3 flash information. in the header it describes the filesize, file location and file name in the header. and i loop thru that info to extract the actual data further in the file. if you need me to post some examples let me know :)
if your trying to extract data, just do it per each loop. or in other words, get filename size and name ect and then extract the data, then loop again. if you have a count of some sort it works a treat. otherwise there is the until loop which works as well, but a count works better. actually you could probably look thru my older post to get an idea of what i mean.

In reply to Re: read CSV file line by line and create hash table by james28909
in thread read CSV file line by line and create hash table by lshokri02

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.