Help for this page

Select Code to Download


  1. or download this
    
    use strict;
    ...
     substr($str, $-[1],$+[1]-$-[1]) = uc $1;
     pos($str) = $+[1];
    }
    
  2. or download this
    $str =~ s/(^|\G$RE{balanced}{-parens=>'<>'})([^<]+)/\U$1\E$2/g;
    # Again? (and now I feel a DUH! coming on (:
    $str =~ s/($RE{balanced}{-parens=>'<>'})/\U$1/g;