It is much easier to use a system call to mv to move multiple files/directories, but I want to use the Perl module File::Copy to accomplish this. Basically, I need to move the contents of the directory I'm in up to the parent directory. From what it looks like, you can't just use * wildcards like you can with the system mv call. You have to specifically say which directory source goes to which target source. So I'm guessing that I have to get an ls listing of my current directory contents to read through, and then perform a move call on them. Can someone give me a quick code snippet to do this in Perl with File::Copy. Or if there is a way to do this with wildcard substitution, that would be even better. thanks!
Start Free Trial