http://qs321.pair.com?node_id=602209


in reply to processing columns of text

Hi. Welcome to the Monastery. I'm sure many here will want to help you, but you may wish to gain some credibility for the future by showing a little more effort before you ask for help. What have you tried so far? :)

It sounds like you want to step through a data file, reading in each record at a time, splitting those records into meaningful chunks and then performing an arithmetic operation on those chunks using the N-1th record. You'll want to store the results of those arithmetic operations somewhere useful.

As a hint, I would probably use an array (apart from the one that holds the results from the split operation) to store the dates and resulting difference values.

Do you know how to open a file handle, and how to read the file contents line-by-line?