From ab3dadc3715cb85edc63e8b4f5978a0ee61a9057 Mon Sep 17 00:00:00 2001 From: Nathan Glenn Date: Fri, 30 Aug 2013 17:40:53 -0700 Subject: Added note about directories not being created with File::Copy::copy --- lib/File/Copy.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/File') diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index b64f609855..eb821ed9a4 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -461,8 +461,10 @@ argument may be a string, a FileHandle reference or a FileHandle glob. Obviously, if the first argument is a filehandle of some sort, it will be read from, and if it is a file I it will be opened for reading. Likewise, the second argument will be -written to (and created if need be). Trying to copy a file on top -of itself is an error. +written to. If the second argument does not exist but the parent +directory does exist, then it will be created. Trying to copy +a file into a non-existent directory is an error. +Trying to copy a file on top of itself is also an error. If the destination (second argument) already exists and is a directory, and the source (first argument) is not a filehandle, then the source -- cgit v1.2.1