Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
However, the script counts all the way down without printing the countdown as expected. When I substituted "a" in for "$num\r", it waited until the countdown was done (4 seconds in the test), then printed "aaaa", as opposed to printing "a", waiting a second, printing "a", etc. Any suggestions on how to make this work? Thanks.while ($num) { print "$num\r"; $num--; sleep 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl only prints complete lines?
by ikegami (Patriarch) on May 05, 2008 at 09:17 UTC | |
|
Re: Perl only prints complete lines?
by CountZero (Bishop) on May 05, 2008 at 10:23 UTC | |
|
Re: Perl only prints complete lines?
by moritz (Cardinal) on May 05, 2008 at 09:18 UTC | |
|
Re: Perl only prints complete lines?
by FunkyMonk (Bishop) on May 05, 2008 at 09:19 UTC | |
|
Re: Perl only prints complete lines?
by Anonymous Monk on May 05, 2008 at 18:08 UTC |