in reply to Jumping in over my head again
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.
|
|---|