I need to save date information with a certain format, what I have done is get it to print the format I need, but do not save it in the text file, just create it.
my $vbbaAnt;
my $hsbcAnt;
my $scotiaAnt;
my $bancomHoy;
my $santanHoy;
Find the time of the machine
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
my @dias = qw( Dom Lun Mar Mier Jue Vie Sab );
$year += 1900;
$mon++;
If the month is less than 10, add a zero at the beginning
if ($mon < 10)
{
$mon = 0 . $mon;
print $mday;
}
current date
my $hoy;
$hoy = <"$mday . $mon . $year">;
open ("$mday . $mon . $year", '>> viernes.txt');
print "$dias[$wday]\n";
Show the date in "dd mm yyyy" format
print "\n$mday-$mon-$year";