http://qs321.pair.com?node_id=479789


in reply to time difference

Untested code follows ... Update: Bugger, caught out on inode change/creation time - Remember that (stat _)[10] (or -C _) is not file creation time, but rather inode change time.
sub diff { return -1 unless -e $_[0]; my @result = (); my $diff = ((stat _)[10]) - ((stat _)[9]); foreach my $time ((86400, 3600, 60, 1)) { push @result, $diff % $time; $diff -= $result[-1]; } return @result; }

 

perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"