A file with files inside it, all of the same structure. Have you heard of XML, mmmkay?

First I'd change Perls internal input record seperator ($/) variable to that mystery character and suck the file contents into an array... how big are the subfiles likely to grow? This is an issue if you machine is not a server.(or it could be)

If I understand you correctly:

There is a really nasty file with records and sub-records.
The records are delimited with a character, you can't find: (try using ord to find it, or a hex editor.)
The sub record has a delimiter IEA..after this delimeter you want to know how many characters there are:  $count = m/IEA(.)*$/g does the trick, I think. (This is a regular expression that will get you the number of characters from IEA to the end of the file.)

I suspect what you want is a lot simpler for Perl to do, but you've come from a less friendly language (but I'm far too polite to say that ;-)

--
Brother Frankus.

In reply to Re: Jumping in over my head again by frankus
in thread Jumping in over my head again by bsummerer

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.