my $path_to_counterfile = "/tmp/merlyn.counterfile"; use File::CounterFile; my $next_number = File::CounterFile->new($path_to_counterfile)->inc; [download]