in reply to Re^4: Copying files from a directory to cwd
in thread Copying files from a directory to cwd

That can't be the error message you get, it doesn't give a reason why cp failed (if there was an error and copy returned false, $! would have been set)

Also, the code you posted at Re^4: Copying files from a directory to cwd doesn't even compile, so see How do I post a question effectively?

  • Comment on Re^5: Copying files from a directory to cwd