in reply to How to merge two files?
Read the 2nd file, and store the data into a hash, where the names are the keys and the areas are the values.
Loop through the 1st file, and whenever you detect a name (possibly by splitting the line on whitespace and counting the number of tokens), extract the area from the hash and append it to the line. Then print out the line.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to merge two files?
by toolic (Bishop) on Aug 22, 2009 at 00:32 UTC |