Modify your code as follows:
@time = ( 1 .. 5 ); { local $| = 1; # Set buffering to autoflush. foreach ( @time ) { print "."; sleep 1; } }
See perlvar under the $| description for an explanation of the buffering autoflush special variable.
Dave
In reply to Re: printing without escape sequences "n"
by davido
in thread printing without escape sequences "n"
by nwkcmk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |