diff options
author | LAUN Wolfgang <wolfgang.laun@alcatel.at> | 2004-09-17 16:01:11 +0200 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-09-20 22:11:29 +0000 |
commit | a4142048d093908dfadd5b3e7ed8f633af464ea8 (patch) | |
tree | 837c366c7b57bff31b4d1014d2206186ed3a1e53 /pod | |
parent | 2a99bba51541367c1fa77cddaf4838ae3213738a (diff) | |
download | perl-a4142048d093908dfadd5b3e7ed8f633af464ea8.tar.gz |
Re: [perl #31586] utime does not reach expectations [PATCH]
Message-Id: <DF27CDCBD2581D4B88431901094E4B4D02B0C88B@attmsx1.aut.alcatel.at>
Clarify the effect of utime when the file isn't owned by the user
p4raw-id: //depot/perl@23331
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlfunc.pod | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 9d9d0a07ee..211bdc8199 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -6400,7 +6400,8 @@ files. The first two elements of the list must be the NUMERICAL access and modification times, in that order. Returns the number of files successfully changed. The inode change time of each file is set to the current time. For example, this code has the same effect as the -Unix touch(1) command when the files I<already exist>. +Unix touch(1) command when the files I<already exist> and belong to +the user running the program: #!/usr/bin/perl $atime = $mtime = time; @@ -6410,7 +6411,8 @@ Since perl 5.7.2, if the first two elements of the list are C<undef>, then the utime(2) function in the C library will be called with a null second argument. On most systems, this will set the file's access and modification times to the current time (i.e. equivalent to the example -above.) +above) and will even work on other users' files where you have write +permission: utime undef, undef, @ARGV; |