in reply to Can't Write to Files properly

However, I cannot parse the list properly. I can output to display ok, but file writes are messed up.
That is not a very helpful description of your problem.

Actually you have two problems and you should handle them one by one:

  1. Parsing the HTML file into a data-structure. To look into that problem, please define how your data-structure should look and then we can perhaps help you how to achieve that.
  2. Writing the data-structure to a file. I *guess* some kind of templating system would be a good solution here.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: Can't Write to Files properly
by sdyates (Scribe) on Dec 04, 2011 at 18:42 UTC
    Using the two HTML files will better explain the data structure. The only part I am having trouble with is getting the list parsed. If you run from cmd, you will see how the list should be processed, but the output files mess up the list. I believe the problem is somewhat related to OUTPUT and the array. I have no idea what to do other than start over from scratch.