--- "Brett W. McCoy" <[EMAIL PROTECTED]> wrote:
> On Fri, 22 Jun 2001, Paul Burkett wrote:
>
> > I got a little over enthusiatic (however you spell it)
> > it seems that it will work, but only for a few
> > entries....should I put the autoflush after every
> > statement? or just at the end? I'm guessing this does
> > not do so much with Perl but with the camera hardware itself.
>
> The autoflush ($|) only needs to be set at the beginnging of your
> script, since it's a built in Perl variable.
yup.
Perl checks it to see whether or not to "auto"-flush when you send
output. You can also set it on filehandles you open by select()'ing
them first:
{ open FH, ">$whatever" or die $!;
my $prevh = select FH; $|=1; select $prevh;
} # now FH will autoflush =o)
The $prevh bit is just if you want to be sure to reset the default
filehandle, such as when you're in a function and don't know for sure
that it's still STDOUT. I only added the braces to scope the my()....
=====
print "Just another Perl Hacker\n"; # edited for readability =o)
=============================================================
Real friends are those whom, when you inconvenience them, are bothered less by it than
you are. -- me. =o)
=============================================================
"There are trivial truths and there are great Truths.
The opposite of a trival truth is obviously false.
The opposite of a great Truth is also true." -- Neils Bohr
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/