I have about 10-20K records and only need certain cities. I would like to make this work in perl but i can’t seem to find an example of just what i need. searchme.csv and list.csv if city is found delete record/row. I was sorting and splitting the screen but now there is just way to many to hand pick out. Please any help would be much appreciated. Im only a nueb.
- searchme.csv contains rows with ‘name,address,city,state,zip,phone’ with header.
- list.csv contains 1 row with header ‘city’ and 50+ rows of the cities that I want to keep.
- So for each row in searchme.csv get the ‘city’ into a $variable and loop thru the list.csv if match found write the full row from searchme.csv to new file new.csv. the more i play with this i got it to loop over the searchme.csv, i think i need to load the cities.csv into and array and loop thru the array within the while loop. and if found print to new.csv.
I couldn’t quite tell from your last comment whether you’re still working on this, or not. In any case, here’s a solution to consider.