Help for this page

Select Code to Download


  1. or download this
    perl -pi -e 'm{^/index} and s/$/%/' file
    
  2. or download this
    use Tie::File;
    
    ...
    for(@fl) {
      m{^/index} and s/$/%/;
    }
    
  3. or download this
    open(my $in_fh,  '<', "input.filename")  or die "ack: $!";
    open(my $out_fh, '>', "output.filename") or die "ack: $!";
    ...
    
    rename( "output.filename", "input.filename" )
      or die "ack: $!";