Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Search & Replace Across Two Filesby generator (Pilgrim) |
on Nov 21, 2010 at 12:01 UTC ( [id://872782]=note: print w/replies, xml ) | Need Help?? |
Well, for one thing, both files are being opened for "read only" access ("<"). "+<" will allow both read and write.
You might consider reading the first file's code - room pairs into a hash (presuming that each numeric code is unique) and open the second file substituting the hash key for the hash value "looked up" in the first file.
<>< generator
In Section
Seekers of Perl Wisdom
|
|