While looking over the 'print over prior print' thread, I found that, as it
should be, perl will print out as fast as it can. Below code

#!/usr/bin/perl -w

$count = 1;

while(1) {
        $count++;
        print "${count}\r";
}

So? Great, right? Well, what if I want to slow if down with a sleep()
statement?

#!/usr/bin/perl -w

$count = 1;

while(1) {
        $count++;
        print "${count}\r";
        sleep(1);
}

>From what I have done using perl 5.4.x, I was able to do things like this.
But it seems that perl 5.6.0 will just sleep and not print anything out. Can
someone explain why? And can some one explain how to slow the while loop
down a bit if not using sleep()?

Thanks!

-James


James Kelty
Sr. Unix Systems Administrator
The Ashland Agency
541.488.0801
[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to