I'm trying to create a search engine for a CSV file of phone numbers. Each line in the CSV is a number, with the City, State and Area Code it's in. I can easily create a search for any of those fields individually or all of them if they're all filled in but I can't search for say, City and State with the Area Code field blank. If I fill in City and State, I want all the hits from the file that are a City with that name in the specified State, whatever Area Code it might be in. Or if I just fill in the Area Code, I want all numbers in that Area Code. I'd post code but I only have the basic split the line ,match the input to the value, if it matches push the line into an array for later printing.
I'm sure this is an easy problem, but for some reason I can't find the answer. I'm not opposed to using DBI but I figured there has to be an easier way. Thanks in advance.