in reply to Recursive subroutines and closures

I believe you can use File::Backup module to take backup of files easily.