I just started working in Perl the other day and it's been going pretty well but today I hit a hitch I can't seem to overcome. I was creating a do...while loop (this also occurs in a simple while loop) with an embedded sleep statement and it was giving me some strange behavior. Finally, I narrowed down to this:
it outputs "Hello..." at 5 second intervals.
where as this:
displays nothing and just hangs until I hit C-c.
Why will the first one display "Hello..." while the second without "\n" not? It must have to do with sleep because if I remove it both will be displayed ad infinitum.
Thanks much for your help in advance.