in reply to Re: Re: Arrays of Hashes
in thread Arrays of Hashes
The result is getting buffered, in case you print more output which should be appended to the end of the line you already have, adding the newline tells the system that you are definately not going to be adding new information to the end of that line, so it doesn't have to buffer it anymore. I'm assuming you are running this in some manner that causes a window to pop up and display the output and then disappears when the program is finished, which would explain the sleep. If you run it from the command line you would see that the buffer also gets flushed when the program exits, so you would get your output eventually, just not until the sleep was finished.
| We're not surrounded, we're in a target-rich environment! |
|---|
|
|---|