in reply to Copying a directory and its contents wihile displaying a progress bar

Read the list of files with readdir/File::Find and their sizes by -s (Dir::List seems to be able to do the job as well), compute the ratio. Alternatively, Filesys::DiskUsage may give you the total size.