Re: printing "progress" marks problem...



Hi

Sounds like the buffer is waiting. You can force buffer output.

our $old_fh=select(STDOUT);
$|=1; # Make PROGRESS socket hot
select($old_fh);

I know it works on Linux but I have no experience on Windows.

Regards
John

<tewilk@xxxxxxxxx> wrote in message
news:1160893107.425868.322940@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a simple program which I'm move about 10,000 files to different
folders on my hard drive. During the process I'm wanting to print
"progress" marks... nothing fancy but printing a character (*) for each
file moved. Progress mark works fine for small file counts but not for
the large file counts.

my print line is: print "*";

which at the end of my foreach loop...

looks like that perl is writing to stdout until my move is complete.
For example during my test of 15 files, the output prints out almost
instant because there is not much going on. But my test of 755 files
sits without printing a thing until all the files are moved. I know
the process is working (move process) because I see the file move out
of the working directory, then once it complete I have a half page of
"*".

Platform is windows xp. perl 5.8.8

any ideas?

Thanks



.



Relevant Pages

  • Re: printing "progress" marks problem...
    ... Thanks John, You are on the right track and thanks for the quick ... "progress" marks... ... looks like that perl is writing to stdout until my move is complete. ... of the working directory, then once it complete I have a half page of ...
    (perl.beginners)
  • printing "progress" marks problem...
    ... "progress" marks... ... looks like that perl is writing to stdout until my move is complete. ... of the working directory, then once it complete I have a half page of ...
    (perl.beginners)
  • Re: What is this error ?
    ... xeon, SCO Unix OSR5.06a, Progress V8.3C11). ... I created the multi-volume database on the new server using the prostrct ... rebuild all indexes and I got the same error with the same addr 2147481600. ... the sort will use the working directory and all available space from ...
    (comp.databases.progress)
  • Re: Problems flushing my buffer! (perl)
    ... I read the perl faq and saw that by setting $| true ... And a web browser ... But neither of these has _ANYTHING_ to do with Perl but would happen ... the progress it is making from time to time and have that appear in my ...
    (comp.lang.perl.misc)
  • Re: Summary for mean/average calculation in perl
    ... Depending on how you understand Perl and what progress ... - W. Somerset Maugham ...
    (perl.beginners)