2008/8/11 Brian Raven <[EMAIL PROTECTED]>
> Tobias Hoellrich <> wrote:
> > Try:
> > $|++;
> > to unbuffer STDOUT.
> >
> > Hope this helps - Tobias
>
> Not quite. That variable activates autoflush, which isn't
> quite the same as unbuffered output, on the currently selected
> filehandle, which
Tobias Hoellrich <> wrote:
> Try:
> $|++;
> to unbuffer STDOUT.
>
> Hope this helps - Tobias
Not quite. That variable activates autoflush, which isn't
quite the same as unbuffered output, on the currently selected
filehandle, which may not actually be STDOUT (see 'perldoc perlvar').
Also,
Try:
$|++;
to unbuffer STDOUT.
Hope this helps - Tobias
On Aug 10, 2008, at 4:16 PM, "Daniel Burgaud" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a simple script that uses print in a loop to update the
> screen something like this:
>
> for ( ) {
> .
> .
> .
> print ".";
> }
Hi
I have a simple script that uses print in a loop to update the screen
something like this:
for ( ) {
.
.
.
print ".";
}
print "\n";
The problem, while within the loop, the screen does not update. Only once
print "\n" is encountered
will the screen display the whole printout.
Suresh,
Why not use brackets?:
print (($char x $number_of_chars . "\n" ) x $number_of_lines, "\n");
that's one way to do it. I did not set the outer brackets. :-*
Thanks
Karl-Heinz
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listser
Timothy,
How about this:
print $char x $number_of_chars . "\n" for 1..$number_of_lines;
that's another way to do it. Thanks for the hint. This looks a little
more smarter than the other solution, but that's only my opinion. I find
it more readable.
Thanks
Karl-Heinz
Karl-Heinz Kuth wrote:
> I've got the following problem:
>
> use strict;
> use warnings;
>
> my $char = "-";
> my $number_of_lines = 3;
> my $number_of_chars = 20;
>
> print "This is the output I want: \n";
> my $line = $char x $number_of_chars . "\n";
> print $lin
How about this:
print $char x $number_of_chars . "\n" for 1..$number_of_lines;
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Karl-Heinz Kuth
Sent: Monday, May 08, 2006 4:30 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: Problem
Hi,
I've got the following problem:
use strict;
use warnings;
my $char = "-";
my $number_of_lines = 3;
my $number_of_chars = 20;
print "This is the output I want: \n";
my $line = $char x $number_of_chars . "\n";
print $line x $number_of_lines, "\n";
# I do not want to use the var $line. So ho