From: Austin Ziegler Date: 2004-08-30T04:11:45+09:00 Subject: Re: File read progress On Mon, 30 Aug 2004 03:55:28 +0900, JG wrote: > Hopefully this is an easy one... > > I'm processing a very large file into a hash and would like to have a status > message telling me how far along it is (i.e. 30% processed...). What I > would like to do is: > > 1) find out how many times a keyword is found in this file (since this is a > big file I don't want to have to iterate twice, once for total keywords and > once for storing the records associated with them), or > 2) query the filehandle to tell me where I am at with respect to the total > file size. As long as your file read routine is written to take a hash, then you should have no problem. I recommend using progressbar.rb on RAA to make your progress bar, though. Note: I'm pretty sure that 0.8.0 isn't the ideal version, because I think it added some Windows incompatibilities; I need to check and send a patch to the maintainter. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca