# Script
use POSIX qw(strftime);
my $now_string = POSIX::strftime("%Y%m%d_%H%M%S", localtime);
print "$now_string\n";
use POSIX qw(strftime);
my $now_string = POSIX::strftime("%Y%m%d_%H%M%S", localtime);
print "$now_string\n";
# Output
D:\Radisys_work\scripts>perl
test_date.pl
20110708_101903
Good reference:
http://www.tutorialspoint.com/perl/perl_date_time.htm
20110708_101903
Good reference:
http://www.tutorialspoint.com/perl/perl_date_time.htm
No comments:
Post a Comment