Shipped File::Stamped 0.03
This version of File::Stamped supports 'callback' parameter to support more flexible file name generation.
You can use callback function as following style.
my $pattern = '/path/to/myapp.log.%Y%m%d.log'; my $f = File::Stamped->new(callback => sub { my $file_stamped = shift; local $_ = $pattern; s/!!/$$/ge; $_ = POSIX::strftime($_, localtime()); return $_; });
Enjoy!