J
jend
my @thoseLabels = qw(Tom's John's Jim's mike blah bloh);
my $this_array = "'".join("','", map { $_ =~ /\'/ ? $_ =~ s/\'/\\'/g
: $_ } @thoseLabels)."'";
print $this_array;
However I want it to come out like this:
is it possible to rewrite this one liner to do this?
any tips would be greatly appreciated!!
~D
my $this_array = "'".join("','", map { $_ =~ /\'/ ? $_ =~ s/\'/\\'/g
: $_ } @thoseLabels)."'";
print $this_array;
However I want it to come out like this:
is it possible to rewrite this one liner to do this?
any tips would be greatly appreciated!!
~D