Help for this page

Select Code to Download


  1. or download this
    my $cnt = '0000';
    while (<>) {
        s/^(\*{3,})$/"$1 ". ++$cnt/e;
        print;
    }
    
  2. or download this
    my $cnt = '0000';
    while (<>) {
        s/^\*{3,}\K$/" ". ++$cnt/e;
        print;
    }
    
  3. or download this
    perl -pe'BEGIN { $cnt = '0000' }  s/^(\*{3,})$/"$1 ". ++$cnt/e'
    perl -pe'BEGIN { $cnt = '0000' }  s/^\*{3,}\K$/" ". ++$cnt/e'