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)
我想摘取姓名和相应的档案名称。 例如,Charles是从事实际工作的人的名字。
我认为,我需要
- 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