Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: map array elements with single quotes

by ikegami (Patriarch)
on Mar 10, 2010 at 07:24 UTC ( [id://827710]=note: print w/replies, xml ) Need Help??


in reply to map array elements with single quotes

join

print(join(',', map "'$_'", @foo), "\n");

But what about something with an apostrophe in it (say The People's Republic of China, since you're mostly listing countries). You should probably be using Text::CSV_XS

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found