I have a need to randomize a header image on a CGI on a slightly-longer interval than I am doing right now (currently every page load). I can randomize the image on every page load, but I'd like it to remain static for a longer period of time.
What's the best way to do this, without writing any lock files or without adding a row in a database, if possible? If not, what's the best way to do this with a drop file?
Or is there another approach aside from using 'my $random = int(rand(n));' on a periodic basis or every page load?