I feel the problem has to do with either buffering or messed up file issues ...

That is kind of optimistic :)

Going from Can't Write to Files properly to At it again... is one step forward, two steps backwards.

Its good you've trimmed a lot from your program, but you still have a whole bunch of code which you're not interested in debugging. Get rid of it :)

This time there is no sample input, but you can link to the old input, like junk.941732.part2.htmljunk.941732.part3.html

The title "At it again" doesn't describe what problem you're trying to solve :)

See How do I post a question effectively? and How do I compose an effective node title?

What I find confusing is, you didn't turn CountZeros solution into a function, you're still trying to parse UL by hand, why?

You need more functions. Functions that take arguments, functions that do not depend on global variables.

Read Help with locating bp region in chromosome and Return 2 arrays, sort the same, and concatenate them. Read my replies, the nodes I link and esp the readmore sections (code).

Then start your project over with extracting data from html using xpath. While CountZeros solution might work and its already written, xpath is much easier, so you might as well switch now, you can use it for this whole project.

Speaking of this project, there is a good chance this data is computer generated, and if you contact the admin at http://amiga.resource.cx/about.pl they can provide you with the output you desire, faster than you could write the program :)

Good luck


In reply to Re: At it again... by Anonymous Monk
in thread At it again... by sdyates

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.