perl.cvs.perlfaq
[Top] [All Lists]

[svn:perlfaq] r11446 - perlfaq/trunk

Subject: [svn:perlfaq] r11446 - perlfaq/trunk
From: comdog@xxxxxxxxxxxx
Date: Mon, 23 Jun 2008 10:16:40 -0700 (PDT)
Newsgroups: perl.cvs.perlfaq

Author: comdog
Date: Mon Jun 23 10:16:39 2008
New Revision: 11446

Modified:
   perlfaq/trunk/perlfaq5.pod

Log:
* perlfaq5: How can I copy a file?
        + Note that if you copy the file yourself, you need to update
        the permissions, owner, and group on the new file


Modified: perlfaq/trunk/perlfaq5.pod
==============================================================================
--- perlfaq/trunk/perlfaq5.pod  (original)
+++ perlfaq/trunk/perlfaq5.pod  Mon Jun 23 10:16:39 2008
@@ -302,11 +302,11 @@
 C<.c.orig> file.
 
 =head2 How can I copy a file?
-X<copy> X<file, copy>
+X<copy> X<file, copy> X<File::Copy>
 
 (contributed by brian d foy)
 
-Use the File::Copy module. It comes with Perl and can do a
+Use the C<File::Copy> module. It comes with Perl and can do a
 true copy across file systems, and it does its magic in
 a portable fashion.
 
@@ -314,9 +314,10 @@
 
        copy( $original, $new_copy ) or die "Copy failed: $!";
 
-If you can't use File::Copy, you'll have to do the work yourself:
+If you can't use C<File::Copy>, you'll have to do the work yourself:
 open the original file, open the destination file, then print
-to the destination file as you read the original.
+to the destination file as you read the original. You also have to
+remember to copy the permissions, owner, and group to the new file.
 
 =head2 How do I make a temporary file name?
 X<file, temporary>

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:perlfaq] r11446 - perlfaq/trunk, comdog <=