Help for this page
my $lock = "/tmp/lock_foo"; if( ! -f $lock || time - (stat($lock))[9] > 600 ){ ... open FILE '>', $lock; # optionally write info/details to it }
use Cache::FileCache; my $cache = new Cache::FileCache( { namespace=>"TimeLocks" } ); ... # do stuff $cache->set( $key, time, "10 minutes" ); # note the value could jus +t be '1', or any other true value. }