in reply to Insert comma after every character

So, you have "F", "B", a space, "D" and want to turn that into "F", comma, space, "B", comma, space, "D"? The simplest way is:
$str = "F, B, D" if $str eq "FB D";
Are we free to generalize this? Here's a broad generalization:
$str = "F, B, D";
Or do you want something else? Perhaps you can describe it, instead of assume we're all omniscient, and can deduce what you want from a single example, and some botched code.

Replies are listed 'Best First'.
Re^2: Insert comma after every character
by johngg (Canon) on Apr 21, 2010 at 16:12 UTC
    you have "F", "B", a space, "D"

    I don't think there's a space there, I can't see one when viewing the page source.