Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!C:\xampp\perl\bin\perl.exe -T
- print "Content-Type: text/html\n\n";
- print "<html> <head>\n";
- print "<title>Inicio</title>";
- print "</head>\n";
- print "<body>\n";
- use strict;
- use DateTime;
- use Time::Local;
- use POSIX qw/strftime/;
- use open OUT => ':locale';
- my ($s, $min, $h, $d, $m, $y) = localtime();
- my $time = timelocal $s, $min, $h, $d, $m, $y;
- my $ano = strftime "%Y", localtime $time;
- my $today = strftime "%d de %m de %Y ", localtime $time;
- print "<h1 style='text-align: center;'>Bienvenido a mi sitio !!</h1>\n";
- print "<br>\n";
- print "<h1 style='text-align: center; color: blue;'>$today (";
- my $fecha = DateTime->new(year => $ano, month => $m+1, day => $d, locale => 'es_ES',);
- print $fecha->day_abbr();
- print ")</h1>\n";
- print "</body> </html>\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement