Here is what I have.
#!/usr/bin/perl -w
use strict;
use Date::Calc qw(Days_in_Month System_Clock Add_Delta_YM);
my ($year,$month,$day, $hour,$min,$sec, $doy,$dow,$dst) = System_Clock();
my ($ReportYear,$ReportMonth,$ReportDay) = Add_Delta_YM($year,$month,$day, 0, -1);
my $ReportY2D = substr...