|Think about Loose Coupling|
Re: Generating a List of numbersby mlebel (Hermit)
|on Feb 02, 2012 at 02:59 UTC||Need Help??|
I read the post "I know what I mean. Why don't you?" so based on that I will re-write this again.(i'm really not sure how short i can keep it but i will try).
I fixed a part of my problem. I needed to open the "tmpipaccountingfile" during the outer loop and close it right after the end of the second loop.
I shrunk the "tmpipaccountingfile" to this:
And i put the rest of the data within the script which looks like this:
Now this mostly works. The new problem that I am running into now, is that I don't get any output with the script like this. But if i replace the line "next unless ($Line =~ m/^\s*\d*.\d*.\d*.\d*\s*"$OuterData"/);" with "next unless ($Line =~ m/^\s*\d*.\d*.\d*.\d*\s*"10.2.9.6"/);" for example, I will get the following output:
I beleive that this proves that it works but it's not what I am looking for. The output that I am expecting to see with the code that I provided is this:
I hope that this is clear because I have no clue how to simplify it any further.
Aaron, I will be going to read up on hash array's since it seems that it's probably the way to achieve this from what I gather from all the posts. From what you said, it sounds like what I am looking for and if I need a hash to acheive this, how would that be written?
The results of each ip groups found would ultimately be pushed to an array for some calculations to be done for each ip's individually. I say this incase it influences any code that you might provide
Now, I must say that you guy's are pretty tough, but it's ok, I have thick skin and I am learning in the process to become a better programmer. so thank you.
So, lastly, how do i fix this?