rangersfan has asked for the wisdom of the Perl Monks concerning the following question:
My problem is that I have a text file that looks like
and what I want to do is calculate all the average1's and all the average 2.today average1: 3.2 average2: 5.5 tomorrow average1: 3.0 average2: 5.0 so on and so on . . . .
so I've written something that so far opens a file and does a regex search for
however I don't know the best way to manipulate this data. More importantly what i'm looking for is how would I just get it to print just the numbers so at the very least I could put them in array. Or is this the best method?print $line if $line ~=/average1/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: seeking advise on average value problem
by graff (Chancellor) on Mar 26, 2006 at 00:06 UTC | |
by rangersfan (Novice) on Mar 26, 2006 at 00:21 UTC | |
by rangersfan (Novice) on Mar 26, 2006 at 00:52 UTC | |
by rangersfan (Novice) on Mar 26, 2006 at 01:18 UTC | |
by graff (Chancellor) on Mar 26, 2006 at 01:47 UTC | |
by rangersfan (Novice) on Mar 27, 2006 at 01:08 UTC | |
|
Re: seeking advise on average value problem
by johngg (Canon) on Mar 25, 2006 at 23:58 UTC |