Help for this page

Select Code to Download


  1. or download this
    # expecting that $file has file name.
    open (INF,"$file") or die "Unable to open \'$file\': $!";
    open (OUTF,".temp_file") or die "Unable to create temp file: $!";
    ...
      print OUTF "$_";
    }
    rename (".temp_file","$file");
    
  2. or download this
    # remove all the character after last dot
    $line=~s/\.\w+$//o;