my $str = '+book +dog +cat'; print '"', $str =~ s/ /", "/gr, '"';