in reply to stat and localtime

What's with the heavy mathematics? Why don't you just compare epoch times and be done with it.
$filename1 = "c:/progra~1/imms"; #file on the client (win +95/98). $filename2 = "//bmc_1/imms_stock/imms_exe/imms.exe"; #file on serve +r. if ((stat($filename1))[10] < (stat($filename2))[10]) { print "$filename1 is old\n"; copy ($filename2, $filename1) or die "copy failed: $!\n"; print "$filename2 updated!\n"; }else{ print "$filename2 is up to date!\n"; print "No files copied!\n"; }

Of course, that's a little obfuscated. I would tend to write that as

sub file_age { (stat($_[0]))[10]; # return the epoch seconds since the file was cr +eated } $filename1 = "c:/progra~1/imms"; #file on the client (win +95/98). $filename2 = "//bmc_1/imms_stock/imms_exe/imms.exe"; #file on serve +r. if (file_age($filename1) < file_age($filename2)) { print "$filename1 is old\n"; copy ($filename2, $filename1) or die "copy failed: $!\n"; print "$filename2 updated!\n"; }else{ print "$filename2 is up to date!\n"; print "No files copied!\n"; }
--
g r i n d e r
just another bofh

print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u';