Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: splitting a large text file and output

by Gulliver (Monk)
on Jun 10, 2011 at 16:35 UTC ( [id://909160]=note: print w/replies, xml ) Need Help??


in reply to Re: splitting a large text file and output
in thread splitting a large text file and output

The original post has been updated with some code but not enough of the input file was provided and kennethk's other questions weren't answered.

The description is confusing because you don't tell us things like what defines a header, what kind of data comes after the header, etc. Are the headers always all text? Or are there numbers or punctuation? Is the data always just numbers? If you can explain the problem in English then you are halfway there for writing the code.

My guess as to why it won't output the last section is because your existing code only writes to output when it sees a blank line. If the input file ends without a blank line then no output.

  • Comment on Re^2: splitting a large text file and output

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://909160]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2025-03-27 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (70 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.