Your skill will accomplish
what the force of many cannot
Re: Reading through a file and checking for a specific stringby 2teez (Curate)
|on Aug 19, 2013 at 20:16 UTC||Need Help??|
Scanning through your codes, there are several stuff, that is wrong.
to start with, then you will discovery that several of your codes didn't end with a ;.
You said you are using a glob function, but their is non in your code, so you only have the string "/export/home/date_file*.txt", in your array variable "@files".
I have array1 - @types that has these 2 letter strings(which I am supposed to check for in each file in each line, This variable is found in each line at 41st character.) and array2 - @counts where I am trying to store count if that match is found.Instead of using two arrays, why don't you use a HASH, with the type of strings you would be looking for as the keys and initialized them to zero like so:
then later you can do... *
I don't except the pseudo-code to work, since the OP didn't show any dataset.
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me