Thanks for the responses! I can sort of see what's going on with your sample code. I assume I'm doing to replace DATA with the directory. Maybe not. I'm trying to make sense of the FAQ at the moment.
I suppose I actually need to modify my original intentions.
The data I need to read exists in directories within a parent directory. For example, I have directories 1, 2, 3, ... , 10, all within a parent directory (call it /users/parent/).
Within those folders is a file (file will always have the same name) with six columns with headers. I'm assuming the $value and $time are the headers of columns within my data file.
Additionally, I no longer need the difference. What I'd like to do is just pull the maximum value of a specific column within a specific range of column 1 (3000 to 3640), as well as the value in column two corresponding to the time closest to 3000 in column 1. These will be exported as two different columns to another file: max value in column one, "initial" value in column 2.
Ugh. Perl's notation is so different from what I've seen elsewhere. I feel like I'm drinking from a firehouse for a fairly simple problem.
EDIT: Working on it, btw. But it will take some time. Thanks for getting me started :)
In reply to Re^2: New to Perl - locating max, subtracting initial, printing output, all across several files in differing directories
by jtrousde
in thread New to Perl - locating max, subtracting initial, printing output, all across several files in differing directories
by jtrousde
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |