in reply to joining string content

No intermediate array here.

johngg@aleatico:~$ perl -Mstrict -Mwarnings -E 'say q{}; my $str = q{+book +dog +cat}; say join q{, }, map { q{"} . $_ . q{"} } split m{\s+}, $str;' "+book", "+dog", "+cat"

I hope this is helpful.

Cheers,

JohnGG