Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: processing columns of text

by ptum (Priest)
on Feb 26, 2007 at 20:19 UTC ( #602209=note: print w/replies, xml ) Need Help??

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?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602209]
[james28909]: my wife isnt confused... she knows everything
[james28909]: good song though

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2017-12-15 13:22 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (432 votes). Check out past polls.