for (my $i = 0; $i <= $#data; $i++) {
This is the only line that I don't understand. What was the reason for using "my" instead of just setting $i=0? I've never used my before and have only seen it used in subroutines. also "$i <= $#data" is giving me some confusion as well. I'm not...
Oops, I spoke too soon. It works absolutely perfectly. I just need to spend some time looking at the code a little harder. I not familiar with some of the commands so I'll need to play around with it to get a better handle on it. I definitely owe you a beer!
Thanks a million! I'll have to spend a while reading over your code to figure out all the commands. The only thing I'm worried about is that it seems like you had tell it which lines the consecutive rows are on. For instance
my $twos = $data[$i+4][2] + $data[$i+5][2];
makes it look like...
The datasets I'm edaling with a fairly small. Maybe a few hunderd kb at the most so the code doesn't have to be very efficient, it just has to work. Here's an example of a fake dataset:
Date Flag Result
6-5 0 1.5
6-6 0 1.7
6-7 0 1.8
6-8 1 0.4...
Hello all. I'm a research scientist with some familiarity with perl but am trying to do some work with tabular data and have no idea where to go from here. I can read in the data fine into several variables, mess with individual rows and export the data out fine. However, I'm stuck as to how...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.