in reply to When does XML get to be too much?

I'd definitely use DB_File for this - zengargoyle's suggestion of Cache::FileCache is not bad either, but a DBM file probably beats it in this case. Something like
use DB_File; use constant PACKFMT => "LI"; sub exit_limit_enforced { print(<<"EOT"), exit } Content-type: text/html <html> <head> <title>Traffic control limit reached</title> </head> <body> $_[0]<br /> Your IP: $ip<br /> Last visit: $time<br /> Number of Visits: $visits </body></html> EOT tie my %limit, 'DB_File', './data/rsn_users.dbm'; my $ip = $ENV{REMOTE_ADDR}; my ($time, $visits) = exists $limit{$ip} ? unpack PACKFMT, $limit{$ip} : (time() - 21, 0); $visits = 0 if $time < time() - 86400; exit_limit_enforced("You reloaded too soon!") if $time > time() - 20; exit_limit_enforced( "You are over the allowed number of visits per day!<br />" . "You may not visit again before" . localtime($time + 86400) ) if $visits > 15; $limit{$ip} = pack PACKFMT, $time, $visits; untie %limit;

Makeshifts last the longest.