in reply to database query matching

Look into using DBI with DBD::CSV. You'll build character by learning a simple SQL select statement and realize how applicable and powerful and simple DBD::CSV is.