# my method (from CB): $fn = ''; { open my $fh, '>', \$fn; print $fh $base_name, '.'; print $fh strftime("%F-%T"); }