use strict; use warnings; open my $otherfile, ">", "otherfile.txt" or die $!; print $otherfile scalar localtime, "\n";