in reply to a learning exercise - diary program
Now you aren't reading the entire diary entry into memory, only one line at once. Like I said earlier, it is trivial in this program. But it will pay later to think about things like this. Overall, though, it looks good. I've seen plenty of code created for commercial use that is a lot worse than this.#files are open already print "Write to diary. Type quit when finished."; while (($_=<STDIN>) != "quit\n") { print FILE $_; print DIARY $_; }
|
|---|