in reply to Re^2: Need doubled quoted values
in thread Need doubled quoted values

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

Replies are listed 'Best First'.
Re^4: Need doubled quoted values
by AnomalousMonk (Archbishop) on Mar 02, 2015 at 03:52 UTC

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

      Yes fixing one bug caused another typo.

      Maybe I should stop posting from mobile? :)

      Hmm...

      Well I just decided that I will stop posting code from mobile! :)

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

      PS: Je suis Charlie!