Better describe what this macro does (comment fix.)
[syslinux.git] / now.pl
blob6645558c993f4623aea1205100ffe001c05cc338
1 #!/usr/bin/perl
2 # $Id$
4 # Print the time (possibly the mtime of a file) as a hexadecimal integer
5 # If more than one file, print the mtime of the *newest* file.
8 undef $now;
10 foreach $file ( @ARGV ) {
11 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,
12 $ctime,$blksize,$blocks) = stat($file);
13 if ( !defined($now) || $now < $mtime ) {
14 $now = $mtime;
18 if ( !defined($now) ) {
19 $now = time;
22 printf "0x%08x\n", $now;