home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 May / pcp151c.iso / misc / src / trees / syslinux-1.40 / now.pl < prev    next >
Encoding:
Perl Script  |  1998-05-07  |  375 b   |  17 lines

  1. #!/usr/bin/perl
  2. #ident "$Id: now.pl,v 1.4 1998/04/15 03:07:24 hpa Exp $"
  3. #
  4. # Print the time (possibly the mtime of a file) as a hexadecimal integer
  5. #
  6.  
  7. ($file) = @ARGV;
  8. if ( defined($file) ) {
  9.     ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,
  10.      $ctime,$blksize,$blocks) = stat($file);
  11.     $now = $mtime;
  12. } else {
  13.     $now = time;
  14. }
  15.  
  16. printf "0x%08x\n", $now;
  17.