in reply to
Re: Substituting a comma only when it is preceded and followed by a bracket
in thread Substituting a comma only when it is preceded and followed by a bracket
Thank you for this response which was both fabulously quick and which worked just perfectly. Thank you also to everyone else who contributed. For the record, thankfully, I do not have to deal with nested parentheses!
So, being very greedy, but mainly because I want to learn and not have to resort to Perl Monks (too often), please could someone help me understand how the answer
s[ ( \( ^)+ \) ) ][ ( my $x = $1 ) =~ tr,;; $x ]gex;;