Mechanize download progress bar

Well, how could i manage to set up a progress bar while downloading a file ?

$m->get($content3[0], ":content_file" => $origFile); That way i download it. I tried to do this: get size from downloaded file so far / total file size * 100. But this dont work because first the file must be downloaded and then the the progress bar goes.

How could i do that while my file is downloading, my progress bar to go like 1%, 5% .. etc.. something like wget