1. 오늘 날짜 구하기 #

use Date::Calc qw(Delta_Days);

my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime;
$year += 1900;
$mon += 1;
my $today;
$today = sprintf("%04d.%02d.%02d.", $year, $mon, $mday);

2015.01.01.

2. 날짜 더하고 빼기 #

use Date::Calc qw(Add_Delta_Days);

# 30일 전
my ($dt_year, $dt_mon, $dt_mday) = Add_Delta_Days($year, $mon, $mday, -30);
Retrieved from http://hyacinth.byus.net/moniwiki/wiki.php/Perl/날짜 처리 종합
last modified 2015-10-28 13:55:48