more useful options | |
PerlMonks |
Re: search contents of one file and replace with contents of another to make a new fileby flexvault (Monsignor) |
on May 06, 2015 at 17:12 UTC ( [id://1125867]=note: print w/replies, xml ) | Need Help?? |
Welcome vcorby, Your script isn't doing what you think! Please look at 'split'. You need to 'slurp' the file into an array or use a loop to get your first file. (untested)
And life will be easier for you if you start using the 3 parameter 'open' from the beginning: This gives you a start and ask more as you get closer. Note: I like to number my 'die's so it's quicker to find the problem. If you have a 50K line script, you'll be glad you did :-). Regards...Ed "Well done is better than well said." - Benjamin Franklin
In Section
Seekers of Perl Wisdom
|
|