go ahead... be a heretic | |
PerlMonks |
Re^2: Counting instances of a string in certain sections of files within a hashby Maire (Scribe) |
on Nov 01, 2017 at 10:26 UTC ( [id://1202507]=note: print w/replies, xml ) | Need Help?? |
Wow, thank you so much for all of this and especially for your very clear explanations of the changes/improvements that you have made to the original script. Your assumptions that the data is the same as that from our previous discussion and also that I will be performing numerous tasks using this data are correct. I've now implemented the "return \%corpus;" change across the scripts that use that function, thanks! Unfortunately, I haven't yet been able to get this improved script to produce any output when I change the hash from the example one to the hash created by my getCorpus function. However, as I speculated in my reply to hippo above, I suspect that this may be something to do with the function itself. I'm going to run a few tests on small folders of data, to see if I can spot the exact problem. Thanks again for all of this! UPDATE: Ah, the script wasn't producing any output with my function because I was using incorrect syntax to print! I've now got output but, unfortunately, the count values are still lower than they should be. Interestingly, however, they are reporting the same frequencies as the version of this script that hippo helped me with:
In Section
Seekers of Perl Wisdom
|
|