Re: printing "progress" marks problem...
- From: "John" <john1949@xxxxxxxxx>
- Date: Sun, 15 Oct 2006 07:29:59 +0100
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
.
- Follow-Ups:
- Re: printing "progress" marks problem...
- From: tewilk@xxxxxxxxx
- Re: printing "progress" marks problem...
- References:
- printing "progress" marks problem...
- From: tewilk@xxxxxxxxx
- printing "progress" marks problem...
- Prev by Date: printing "progress" marks problem...
- Next by Date: Re: printing "progress" marks problem...
- Previous by thread: printing "progress" marks problem...
- Next by thread: Re: printing "progress" marks problem...
- Index(es):
Relevant Pages
|