#!/usr/bin/perl use strict; use warnings; use Time::Piece; open STDOUT, '>', 'time.log'; my $t = localtime; print $t->strftime("%c"), "\n"; my $mt = localtime; binmode STDOUT, ":utf8"; print $mt->strftime("%c"), "\n";