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:  <%-(-(-(-<