Help for this page

Select Code to Download


  1. or download this
        #!/usr/bin/perl -w
        use strict;
    ...
        s/(\($re\))|\$a/$1?$1:'$b'/eg;
        print;
    
  2. or download this
        my  $re;
        $re = qr/\((?:(?>[^()]*)|(??{$re}))*\)/;
        s/($re)|\$a/$1?$1:'$b'/eg;