use File::Copy::Recursive qw(dircopy); use strict; use vars qw($dir_from $dir_to *mycopy); $dir_from = "/tmp/from"; $dir_to = "/tmp/to"; sub mycopy_func { &mycopy(@_); mycopy_showprogress(@_); } sub mycopy_showprogress { my ($remaining) = @_; printf "copying %s to %s. \r",@_; sleep 1; ##### FOR DEMO ONLY, REMOVE OTHERWISE } $|=1; *mycopy = *File::Copy::Recursive::copy; *File::Copy::Recursive::copy = *mycopy_func; dircopy($dir_from, $dir_to); print "\n"; __END__