- or download this
# regex to add a comma after each char
# i believe you can think of it starting
...
# the () are required to capture each character
$show_choices =~ s/(?<=.)/,/g;
$show_choices =~ s/,$//g; # remove the last comma
- or download this
$show_choices =~ s/(.)/$1,/g;
- or download this
$show_choices =~ s/(.)(?!$)/$1,/g;