in reply to attempt to copy files and directories to new location

You may wish to start with correcting the first call to lista_files. It's currently lista_dirs($dir,$dir); and I assume it's supposed to be lista_dirs($dir,$dir2);

Then add use strict; and use warnings; before the use File::Copy;

Then we'll see what else needs to be corrected.

Replies are listed 'Best First'.
Re^2: attempt to copy files and directories to new location
by ikegami (Patriarch) on Apr 15, 2009 at 18:33 UTC

    I assume it's supposed to be lista_dirs($dir,$dir2);

    Probably, but then again, the second parameter is never used.