hacker has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Randomizing "statically" on a daily/weekly basis
by Zaxo (Archbishop) on Mar 11, 2005 at 02:18 UTC | |
|
Re: Randomizing "statically" on a daily/weekly basis
by japhy (Canon) on Mar 11, 2005 at 02:23 UTC | |
|
Re: Randomizing "statically" on a daily/weekly basis
by jdporter (Paladin) on Mar 11, 2005 at 02:22 UTC | |
|
Re: Randomizing "statically" on a daily/weekly basis
by Thilosophy (Curate) on Mar 11, 2005 at 02:23 UTC | |
|
Re: Randomizing "statically" on a daily/weekly basis
by jhourcle (Prior) on Mar 11, 2005 at 02:26 UTC | |
|
Re: Randomizing "statically" on a daily/weekly basis
by betterworld (Curate) on Mar 11, 2005 at 02:31 UTC |