#!/usr/bin/perl -w
# Name: getfilestat.pl
# secs since 19700101
#
# by Gerd Hoffmann (C)
#
# 001129

#use strict;

#my ( $str, $ii, $jj )

$filename="aaa.aaa";
#$filename="hallo.pl";

($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($filename);
@names = qw(dev ino mode nlink uid gid rdev size atime mtime ctime blksize blocks);
@file_status {@names} = ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks);
# blksize und blocks bleiben null !

while (( $name, $wert) = each (%file_status) ) {
   print "$name:..$wert\n";
}

$secs_per_day=24*60*60;
$secs_per_year=365*24*60*60;                      # 365 days
$dat19960101=26*$secs_per_year+6*$secs_per_day;   # == 1.1.1996
$dat19970101=27*$secs_per_year+7*$secs_per_day;   # == 1.1.1997
$dat19980101=28*$secs_per_year+7*$secs_per_day;   # == 1.1.1998
$dat19990101=29*$secs_per_year+7*$secs_per_day;   # == 1.1.1999
$dat20000101=30*$secs_per_year+7*$secs_per_day;   # == 1.1.2000

#$atime=$mtime=$dat20000101;                      # == 1.1.1996
#utime($atime,$mtime,"hallo.pl");

if ( $mtime < $dat19970101 ) 
{
   print "\"$filename\" ist vor 1997 geändert worden!\n";
}
