If I wanted to print say 10 numbers but instead of
printing each number on a line, I want each successive
number to REPLACE the previous number so it appears
that the number is changing in place.
foreach(1..10){
print "$_";
sleep(1);#delay so i can see the change
print "\r";
}
This co
Charles Lu wrote:
>
> If I wanted to print say 10 numbers but instead of
> printing each number on a line, I want each successive
> number to REPLACE the previous number so it appears
> that the number is changing in place.
I assume you've turned off buffering with $| = 1;
> foreach(1..10){
>