File::NCopy::copy copies files to directories, or a single file to another file. You can also use a reference to a file handle if you wish whem doing a file to file copy. The functionality is very similar to cpWWW: https://metacpan.org/release/File-NCopy