Help for this page

Select Code to Download


  1. or download this
    # reading file into array and then process it 
    # and write out to the same file:
    ...
            print LOG $line;
        }
        close LOG;
    
  2. or download this
    # trying to optimize performance and memory usage 
    # by replacing foreach() with while()
    ...
        close TMP;
        rename($tempfile,"$file");
        close LOG;