#!/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"