http://www.perlmonks.org?node_id=1184656


in reply to why th efollowing error occurs in perl?

http://man7.org/linux/man-pages/man1/find.1.html

is htmlfiles supposed to be a directory, that sure wont work. even if it was

find . -type f -execdir cp '{}' htmlfiles \;
It wont work unless the htmlfiles dir exists already