I have a PERL program and one of the tests in it is the following:
#today's date
$tday = $t[3];
$tday = "0" . $tday if ($tday < 10);
#if today is the first day of the month
if ($tday eq "01"
{
#and if the month is January
if ($tmon eq "01"
{
# make the month December
$tmon = 12;
}
else
{
#subtract 1 from the variable that contains the month
$tmon--;
}
}
I want to test if this works. Is there a way I can fool the system so that it thinks that $tday is actually the first day of the month? Michel, São Paulo, Brazil
#today's date
$tday = $t[3];
$tday = "0" . $tday if ($tday < 10);
#if today is the first day of the month
if ($tday eq "01"
{
#and if the month is January
if ($tmon eq "01"
{
# make the month December
$tmon = 12;
}
else
{
#subtract 1 from the variable that contains the month
$tmon--;
}
}
I want to test if this works. Is there a way I can fool the system so that it thinks that $tday is actually the first day of the month? Michel, São Paulo, Brazil