Re: Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-21 Thread Vladimir D Belousov
Charles K. Clarkson wrote: Harold Castro [EMAIL PROTECTED] wrote: : my $countdown = 5; : while ($countdown 0){ : print \.; No need to escape the period in a double quoted string. : sleep 1; : $countdown--; : } : print Kaboom!! : : And the result.. : after waiting for 5 seconds, it displayed

RE: Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-21 Thread Thomas Bätzler
Mark Jayson Alvarez [EMAIL PROTECTED] asked: [...] Why does this happens with a while loop? I told it to print a single dot every 1 second. Do you know another way of making my progress bar program that display a single dot every one second on the same line until it reaches a given time?

Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-20 Thread Harold Castro
Hi, I'm new to perl and i'm trying to create a simple program that will act like a time bomb but will print a dot(something like a progress bar every second until the specified time arrives. Here's my code. my $countdown = 5; while ($countdown 0){ print \.; sleep 1; $countdown--; } print

RE: Perl waits for while to finish before printing if on the same line,why?(countdown prog)

2005-02-20 Thread TapasranjanMohapatra
-Original Message- From: Harold Castro [mailto:[EMAIL PROTECTED] Sent: Mon 2/21/2005 9:42 AM To: beginners@perl.org Cc: Subject:Perl waits for while to finish before printing if on the same line,why?(countdown prog) Hi, I'm new to perl and i'm trying to create a

RE: Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-20 Thread Charles K. Clarkson
Harold Castro [EMAIL PROTECTED] wrote: : my $countdown = 5; : while ($countdown 0){ : print \.; No need to escape the period in a double quoted string. : sleep 1; : $countdown--; : } : print Kaboom!! : : And the result.. : after waiting for 5 seconds, it displayed this line at once: : :

Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-20 Thread Mark Jayson Alvarez
Hi, I'm new to perl and i'm trying to create a simple program that will act like a time bomb but will print a dot(something like a progress bar every second until the specified time arrives. Here's my code. my $countdown = 5; while ($countdown 0){ print \.; sleep 1; $countdown--; } print

Re: Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-20 Thread Gavin Henry
On Monday 21 Feb 2005 04:08, Mark Jayson Alvarez wrote: Hi, I'm new to perl and i'm trying to create a simple program that will act like a time bomb but will print a dot(something like a progress bar every second until the specified time arrives. Here's my code. my $countdown = 5; while

RE: Perl waits for while to finish before printing if on the same line,why?(countdown prog)

2005-02-20 Thread Manav Mathur
Try this my $countdown = 5; local $|=1 ; while ($countdown 0){ print \.; sleep 1; $countdown--; } print Kaboom!! -Original Message- From: Mark Jayson Alvarez [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 9:39 AM To: beginners@perl.org Subject: Perl waits for while to finish