It would be very helpful if you could supply an short example that is "runnable as posted". Then explain what you want that is different than what your posted code does. There is often more than one way to achieve what you want.
As a side note, be careful with progress bars... as this can be a very "expensive" operation in terms of MIPs. Holds true even you have say a gizmo that displays number of files processed, or a numerical percentage of total work done. You don't want the display of progress to actually slow down the work toward progress itself in any significant way. This can happen if you update the GUI too often.
I recommend that you register as a user on Perl Monks. Doesn't cost anything. A question like this involves back-and-forth and you can't update your post as anon to comply with my request.