Help for this page

Select Code to Download


  1. or download this
    my $str = do {my $i; join "", map {$_ eq '(' ? $i++ : $_ eq ')' && $i 
    +? $i-- : $_ eq ',' && $i ? ($_ = ';') : 0; $_} split '[(,)]', $str};
    
  2. or download this
        "(foo),(bar)"
    
  3. or download this
    substr($str, index($str, "("), rindex($str, ")") - length($str)) =~ s/
    +,/;/g;