|Do you know where your variables are?
I was playing around with that stuff a couple of weeks ago to try and build an upload meter (something like Apache::UploadMeter but using XMLHttpRequest). I have a rough prototype of it working that you can check out here: http://cees.crtconsulting.ca/perl/examples/uploadmeter/.
It was written to work with Firefox so you may not see anything if you are using another browser.
The code is downloadable from that page, but remember that it is just a proof of concept (that means no documentation, just code). I am not using this stuff in production anywhere, but hope to wrap it up into a clean package at some point.
Anyway, back to the question, it would be pretty easy to do a similar thing with a standard progress bar instead of as an upload meter.