饮歌长啸
#!/usr/bin/perluse strict;use Date::Calc qw(Date_to_Time Time_to_Date Add_Delta_Days);my $dt='20140225';my $y=substr($dt, 0, 4);my $m=substr($dt,4,2);my $d=substr($dt,6,2);print "今天是 $dt\n";my ($y1, $m1, $d1) = Add_Delta_Days($y + 0, $m + 0, $d + 0,-1);print "昨天是 ", $y1 * 10000 + $m1 * 100 + $d1 , "\n";my ($y2, $m2, $d2) = Add_Delta_Days($y + 0, $m + 0, $d + 0, 1);print "明天是 " , $y2 * 10000 + $m2 * 100 + $d2 , "\n"。