my $string = q("one","two","three"); my @array = map {s/^['"](.*)['"]$/$1/ ? $1 : $_} split ',', $string; print "@array";