Ask a Question related to PERL Beginners, Design and Development.
-
Michael W . Cocke #1
print outbut being buffered...
This is probably a stupid question, but does anyone know how to force
the output of print to actually PRINT, without forcing me to use a \n?
It's sort of futile to print a '.' every 60 seconds to indicate the
app hasn't crashed if the line of periods doesn't show up on the
screen until a half hour later....
Thanks!
Mike-
Mornings: Evolution in action. Only the grumpy will survive.
-----------------------------------------------------
Please note - Due to the intense volume of spam, we have
installed site-wide spam filters at catherders.com. If
email from you bounces, try non-HTML, non-encoded,
non-attachments.
Michael W . Cocke Guest
-
FLVPlayback Percentage Buffered Possible?
Hi, I am developing an application with the FLVPlayback component which so far, is great. I have cue points, total time, current time and all... -
buffered output?
I have an odd problem... I have a perl script that execs another program: $cmd = "motuds t1.dat t2.dat t3.dat > out1"; exec $cmd; Motuds... -
Raw or Buffered device?
"Art S. Kagel" <kagel@bloomberg.net> wrote in message news:<pan.2003.09.12.12.18.51.444282.10594@bloomberg.net>... This of course is abslutely... -
Database with buffered and unbuffered log.
What is significance of Informix database buffered log or unbuffered log parameter. -
Buffered input/output.
Hello, I am struggling with the following problem: Two unrelated programs communicate via two fifos (is this a good way of communicating between... -
John W. Krahn #2
Re: print outbut being buffered...
"Michael W . Cocke" wrote:
Well, if you want to use print() you are going to have to turn on>
> This is probably a stupid question, but does anyone know how to force
> the output of print to actually PRINT, without forcing me to use a \n?
>
> It's sort of futile to print a '.' every 60 seconds to indicate the
> app hasn't crashed if the line of periods doesn't show up on the
> screen until a half hour later....
autoflush.
$| = 1; # autoflush on
for ( 1 .. 10 ) {
print '. ';
sleep 1;
}
print " done.\n";
Another way to do it is to use syswrite instead which is not buffered.
for ( 1 .. 10 ) {
syswrite STDOUT, '. ';
sleep 1;
}
print " done.\n";
John
--
use Perl;
program
fulfillment
John W. Krahn Guest
-
Drieux #3
Re: print outbut being buffered...
On Jan 27, 2004, at 6:59 AM, Michael W.Cocke wrote:
did you try> This is probably a stupid question, but does anyone know how to force
> the output of print to actually PRINT, without forcing me to use a \n?
>
$| = 1;
cf perldoc perlvar
ciao
drieux
---
Drieux Guest
-
R. Joseph Newton #4
Re: print outbut being buffered...
"Michael W.Cocke" wrote:
{> This is probably a stupid question, but does anyone know how to force
> the output of print to actually PRINT, without forcing me to use a \n?
local $| = 1;
...code for which you need output autoflushed
}
{
local $| = 1;
my $total = 0;
for (1..10) {
my $thousands = $_;
for (1..10) {
my $hundreds = ($thousands * 10) + $_;
for (1..100) {
$current = ($hundreds * 100) + $_;
$current-- while $current;
}
print '.';
}
print "\b"x9, ' 'x9, "\b"x9;
}
print "\n";
}
Joseph
R. Joseph Newton Guest
-
Michael W . Cocke #5
Re: print outbut being buffered...
On Thu, 29 Jan 2004 03:12:21 -0800, [email]krahnj@acm.org[/email] (John W. Krahn)
wrote:
[snipped]>"Michael W . Cocke" wrote:>>>
>> This is probably a stupid question, but does anyone know how to force
>> the output of print to actually PRINT, without forcing me to use a \n?
>>
>> It's sort of futile to print a '.' every 60 seconds to indicate the
>> app hasn't crashed if the line of periods doesn't show up on the
>> screen until a half hour later....
>Well, if you want to use print() you are going to have to turn on
>autoflush.
>
Thanks! That's what I wound up doing. I don't know why, but it took
2 days for my message to post.. I appreciate the replies, but the
question is long answered.
Mike-
Mornings: Evolution in action. Only the grumpy will survive.
-----------------------------------------------------
Please note - Due to the intense volume of spam, we have
installed site-wide spam filters at catherders.com. If
email from you bounces, try non-HTML, non-encoded,
non-attachments.
Michael W . Cocke Guest



Reply With Quote

