use strict; use warnings; while () { my ($var1, $var2, $var3) = /"([^"]*)"/g; print "Var1: $var1\n"; print "Var2: $var2\n"; print "Var3: $var3\n"; } __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