I'm quite sure that any of this myriad of new AJAX libraries has something like this. The rough idea: you have to generate and update a XML file containing the percentage in your perl code and some javascript stuff updates your webpage.
google for it, I think a progress bar is the AJAX "Hello World" program ;)