my %lexicon = map{ => } $csv -> parse # words to match against, and supplementary data to go with matches foreach { foreach { if( exists $lexicon{ } ) { save $lexicon{ } TO tweet.result_data; } } }