UPDATE In the interests of having a workable skeleton that takes account of Fastolfe's point below about -M not being time-compatible, this code has been modified from its original form
You could use the builtin -M test, to find out the last time the file was modified (see Fastolfe's comment below for why this might not be the best way to get the time!).
Here's something skeletal you could build on.
my @today = (localtime)[3..5]; # gets day, month-1, and year
my $last_modified = (stat($tied_hash_file))[9]; # grab the modificatio
+n time
my @last_modified_date = (localtime($last_modified))[3..5];
# search perlfaq4 (I think) for the compare_array routine!
# ... tie the hash, then
%tied_hash = () unless compare_array(\@today, \@last_modified_date);
Philosophy can be made out of anything -- or less |