Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    s/<exm>/'<exm num="'.++$_.'">'/eg;
    
    print;
    
  2. or download this
    s/<exm>(?=.+?example\s+(\d+))/<exm num="$1">/g;