Tuesday, 13 August 2013

A Look at Touching Files

Last time, I created a function to determine if a target file was out of date with respect to its sources. Now I want a function similar to UNIX' touch(1) that will update the atime and mtime of a file. And, like touch(1), it should be able to create empty files. The way to do this is to use Perl's utime function, which is based on UNIX' utime(2) function.