Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: joining string content

by johngg (Canon)
on Jun 24, 2025 at 09:55 UTC ( [id://11165460]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11165460]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2025-11-17 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.