Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Hashs of hash (multiple value) key problem.by graff (Chancellor) |
on Dec 24, 2008 at 11:32 UTC ( [id://732452]=note: print w/replies, xml ) | Need Help?? |
Dude, you are really coming across as being profoundly clueless. This thread is seventh one you've started on this same basic programming task. (For those keeping score, the previous six, in chronological order, are: Regex problem, Extracting Locations in 3 window size, Debug help, Character replacement, Missing to catch 70th character in 3 window size, and Multiple Key Problem help.)
A common attribute of all these threads is that you have never given a clear description of what you are really trying to accomplish. What exactly are the specs for this job? When you say: I want my Output should be like this:- HOW DO YOU KNOW that this is what the output should be? What are the principles for determining what the program is supposed to locate in these files? If you can form a clear, unambiguous answer to that question (in the form of a "cookbook recipe"), it will be a lot easier to get the program to do what is needed. I'm actually somewhat skeptical about the particular values you are citing here as the "desired" output. Where is the "120" supposed to come from, given that File1.txt does not contain this number? As for the particular version of noise you've added in this OP to code that others have suggested to you, I don't understand why you have added a "$ref" variable in this while loop: (I have undone your randomization of the white-space and indentation.) So, you apparently do not realize that the "else" block there does nothing at all except to push an element onto an array ref, which then goes out of scope (disappears completely, ceases to exist) when you step out of that "else" block. I also don't understand why you are using array refs at all in this while loop. I think it's time for you to confess that you really don't understand what you are trying to do, let alone what you are actually doing. If it's important for this job to get done, someone else is going to have to do it. Go to your supervisor or advisor or other knowledgeable person who can speak to you face-to-face, and admit to them that you are lost. It looks like the kind of help you need is not the kind of help you can get from perlmonks.
In Section
Seekers of Perl Wisdom
|
|