in reply to where to use "use" and package
placing a package in the same file as your main program is not really different than defining the package in another file. Had you put the package in a separate file it would be obvious why you couldn't copy, because you never imported the copy method from File::Copy.