in reply to file copy undefined?
Apart from the already mentioned stuff and as it hasn't been mentioned yet: You should consider to use File::Spec and/or File::Spec::Functions to combine your directory and file paths.
My fellow monks
Can't tell (I'm NSA/FBI/HS/...)
Others (explain your deviation)
Results (56 votes). Check out past polls.