The stupid question is the question not asked | |
PerlMonks |
Re: compare 2 CSV files for string return lines in both if matchby kcott (Archbishop) |
on Feb 03, 2018 at 10:23 UTC ( [id://1208390]=note: print w/replies, xml ) | Need Help?? |
Jamming what should be blocks of code into a single line helps nobody, including yourself: it makes the code hard to read and is error-prone. Posting masses of irrelevant data, with records containing hundreds of characters, is not at all useful. Please read "How do I post a question effectively?" and "Short, Self-Contained, Correct Example". Whenever you're dealing with CSV data, you should use Text::CSV. If you also have Text::CSV_XS installed, it will run faster. It's very unclear what you're actually trying to achieve. The following is intended to provide you with some techniques that I think may be useful. You'll need to adapt this to your requirements. Given these dummy CSV files:
This script:
Produces this output:
That seems to be the type of thing you're after but, as I said, I'm really not sure. Hopefully there's something that you'll find useful. If you have any further questions, please follow the guidelines I linked to at the start. — Ken
In Section
Seekers of Perl Wisdom
|
|