#!/usr/local/bin/perl # use strict; use warnings; print map {"Var1: $_->[0]\nVar2: $_->[1]\nVar3: $_->[2]\n"} map {[/"([^"]+)",?/g]} ; __DATA__ "value 1","something else","other stuff" "asdf123","omg","hope this works" "more tests","testy","blah" #### Var1: value 1 Var2: something else Var3: other stuff Var1: asdf123 Var2: omg Var3: hope this works Var1: more tests Var2: testy Var3: blah