[Perl-unix-users] use of carraige return \r

2001-06-05 Thread Charles Lu
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

Re: [Perl-unix-users] use of carraige return \r

2001-06-05 Thread $Bill Luebkert
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){ >