Help for this page

Select Code to Download


  1. or download this
    my $count = 0;
    while (<IN>) {
      s/^"\d+"$/'"' . ++$count . '"'/e;
      print OUT;
    }
    
  2. or download this
    % perl -i.bak -pe 's/^"\d+"$/q(").++$count.q(")/e' myfile