note
CountZero
Open both files for reading and open a new third file for writing.<p>In a <c>while</c>-loop, read file1 line by line<p><c>print</c> each line to the third file.<p> test if you have reached the "architecture DEF_ARCH of fulladder_postsyn is" line and if so, read the whole of file 2 and print this to the third file.<p>Continue with reading and <c>printing</c> file1.<p>Close all filehandles.<p><c>unlink</c> file1 and rename "file3" to "file1".<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-198160">
<p>CountZero</p><p><i>A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity."</i> - [http://www.canonical.org/~kragen/tao-of-programming.html|The Tao of Programming], 4.1 - Geoffrey James</p>My blog: [http://imperialdeltronics.wordpress.com|Imperial Deltronics]
</div></div>
1126171
1126171