That part is becoming clear. Now that I've seen how you treated this, I used your treatment to get closer to what I want to do here. The part I'm changing out begins with this comment:
## see what we got my $phrase = "round is 4"; my @sought = qw ( 2.miST 3.texTech 1.va 5.auburn); print "OUTFILES*******************\n"; foreach my $filename ( glob("./my_data/$first_second/*") ) { open my $fh, '<', $filename or die "can't print $filename! $!"; while ( my $line = <$fh> ) { if ( $line =~ m/$phrase/g ) { say "filename is $filename"; } } close $fh; }
So, I'd like to assemble stats on "who made the final four?" As we see here at official ncaa link, there are only 4 teams left, corresponding to round 4 of the tourney. Indeed, they are enumerated in the @sought variable that I assign in the new script.
Again, I find myself looking for some elbow grease in dealing with these data:
round is 4 3.lsu 3.texTech 2.tn 1.nc finals are 3.lsu 1.nc tournament winner is 1.nc ---------------- OUTFILES******************* filename is ./my_data/03-04-2019-23-07-21/03-04-2019-23-07-21.1.txt filename is ./my_data/03-04-2019-23-07-21/03-04-2019-23-07-21.13.txt filename is ./my_data/03-04-2019-23-07-21/03-04-2019-23-07-21.17.txt ... $
So, I would like this to match on 3.texTech and report that it matched on one correct team for the final four. The order will always be the same in that 2.miST will be only on the line that follows "round is 4", 3.texTech on the next, 1.va the next, and 5.auburn on the line before the line that starts with "tournament". If I have 15 trials, which one got the most correct in the final four?
Why this UTF-8 stuff?No good reason other than that I'm used to it. (I don't know what to cut out without having the wheels fall off.) Thanks for your comments,
In reply to Re^2: using File::Find to grep for text
by Aldebaran
in thread using File::Find to grep for text
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |