i am confused now... Here is my problem: I have a text file in this format
Tom //name
Washington
account.txt //filename
Gary //NAME
New York
accountbalance.png //filename
Mary //name
New Jersey
Michelle //NAME
Larry //NAME
Charles //NAME
Washington
Real.cpp //FILENAME
.
.goes on(large file)
I wanted to extract the name and corresponding filename.For example Charles is the name of the person who worked on real.cpp....
I think I need to
- use a while loop
- used two if statements within it (one to extract name other to extract filenmae)
- end the while loop
Problem faced:I get name and filenames which are not corresponding to it...(due to no unformity of one to one relation in the text file reading) I want the name to be the key and filename to be the value and store this in the hash How to resolve this.....I am confused..Give me suggestions,Pls