Hello oh wise and wonderful monks!
I am having some difficulty with a small script that is designed to sort csv formatted input and run some calculations. There is no set size for the number of lines.
The input is formatted as such.
123456789,123,LOGGED IN MONKEY GET (PHP),200,OK,LOGIN PHP & JAVA PILLA +RS 1-1,text,true,12345,123
Note that this is a single entry, the entire file will have potentially dozens of entries. Also important, the area "LOGGED IN MONKEY GET (PHP)" will change and can include any number of potential categories.
The scope is to grab the values from (assuming a split on comma, ie - 0,1,2,3,4,5,6,7,8,9,10) 1,3, & 8.
It will be necessary to apply a regex to tear just the 'MONKEY' portion out from column 3.
The calculation will run by first counting the number of instances of column 3. Then from there count the number of 'False' from column 8. Finally for that set it will run some calculations for avg, median, etc based the values in column 1.
I am still new to data structures and having a hard time of writing this with any sense of scalability. (I can approach it by searching for matches on column 3, but given that the number of potential strings in that column is in the hundreds, it does not make sense.) Any tips that would point me in the right direction would be uber appreciated.
Thanks so much as always for your guidance!
-bp-
In reply to Hashes, Arrays, and Confusion -- In a bit over my head! by bpthatsme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |