Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Need doubled quoted values

by Anonymous Monk
on Mar 02, 2015 at 01:24 UTC ( [id://1118345]=note: print w/replies, xml ) Need Help??


in reply to Need doubled quoted values

what is your question?

Replies are listed 'Best First'.
Re^2: Need doubled quoted values
by Anonymous Monk on Mar 02, 2015 at 01:29 UTC
    My question is, how do I double quote the individual values in datac.txt?
      Use map{"\"$_\""} before you use join

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)

      PS: Je suis Charlie!

      Update
      Added escaped double quotes

      update
      Fixed lost underscore

        Shouldn't that be  map { "\"$_\"" } (added missing underscore), or perhaps better  map { qq{"$_"} } or even just  map qq{"$_"}, (note: comma is needed)?

        c:\@Work\Perl>perl -wMstrict -le "my $s = join '^', map qq{\"$_\"}, 'foo bar', 'baz boff'; print qq{:$s:}; " :"foo bar"^"baz boff":


        Give a man a fish:  <%-(-(-(-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-23 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found