Read in 2-column CSV, output many files based on field

view story

http://www.unix.com – Is there a way to read in a two-columned CSV file, and based on the fields in 1st column, output many different files? The input/output looks something like: Code: input.csv: call        Call Mom. call        Call T-Mobile. go        Go home. go        Go to school. go        Go to gas station. play        Play music. play        Play Beatles. Code: outputs 3 files: call.xml <value><tokens><token>Call</token>& (HowTos)