in reply to not able to compare files
You are attempting to read the entire file FILE1 for each record of CONTACT. Was that you intention ?
To match "sam" with "Sam", you need to ignore case. The syntax for that would be m/^$name/i. the "i" ignores case.
Depending on how large these files are, and whether or not they are sorted, there are different approaches to solving the problem. Typically, one of the files would be read completely into memory - in this case, store the info in a hash, that you can look up quickly.
Try re-writing using these suggestions, and we can help you get through the next step.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: not able to compare files
by arden (Curate) on Mar 12, 2004 at 05:46 UTC |