From: Gisle Aas Date: Thu, 23 Oct 2003 05:33:43 +0000 (-0700) Subject: utime documentation X-Git-Tag: accepted/trunk/20130322.191538~22818 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c21a326619911d05e8626e425f90895ef6d740e;p=platform%2Fupstream%2Fperl.git utime documentation Message-Id: p4raw-id: //depot/perl@21523 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 4d4efc5..6b093eb 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -6260,12 +6260,8 @@ to the current time. For example, this code has the same effect as the Unix touch(1) command when the files I. #!/usr/bin/perl - $now = time; - utime $now, $now, @ARGV; - -B Under NFS, touch(1) uses the time of the NFS server, not -the time of the local machine. If there is a time synchronization -problem, the NFS server and local machine will have different times. + $atime = $mtime = time; + utime $atime, $mtime, @ARGV; Since perl 5.7.2, if the first two elements of the list are C, then the utime(2) function in the C library will be called with a null second @@ -6275,6 +6271,17 @@ above.) utime undef, undef, @ARGV; +Under NFS this will use the time of the NFS server, not the time of +the local machine. If there is a time synchronization problem, the +NFS server and local machine will have different times. The Unix +touch(1) command will in fact normally use this form instead of the +one shown in the first example. + +Note that only passing one of the first two elements as C will +be equivalent of passing it as 0 and will not have the same effect as +described when they are both C. This case will also trigger an +uninitialized warning. + =item values HASH Returns a list consisting of all the values of the named hash.