RE: [PBML] touch -r
> Does anyone know offhand how to do a "touch -r" from within perl? ISounds like you want Perl's "utime" function. You can set atime and
> want to modify the timestamp of a file, and I'd rather not launch any
> outside commands... so I'm trying to avoid using "system(...)" or
mtime with utime...
utime($atime, $mtime, $file);
If you only want to change one, you can grab the other with stat...
$mtime = (stat $file);
utime(time, $mtime, $file);