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 code works only for increasing numbers, but when
I try to go from 2-digit to 1 digit i.e. (11,10,9)the
final output would be "90". It appears that only the
first digit is replaced with 9. Anyone have any
suggestions? This would be useful in printing out
progress of your program.
thanks
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users