use List::Aged; my $list=List::Aged->new(); $list->add( -expires => "60 seconds", "some","list", "of","random","stuff"); $list->add( -expires => "10 hours", "whee"); $list->exists("random"); # true, for now sleep(61); $list->exists("random"); # false now $list->exists("whee"); # true