Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #!C:\xampp\perl\bin\perl.exe -T
  2.  
  3. print "Content-Type: text/html\n\n";
  4.  
  5. print "<html> <head>\n";
  6. print "<title>Inicio</title>";
  7. print "</head>\n";
  8. print "<body>\n";
  9. use strict;
  10. use DateTime;
  11. use Time::Local;
  12. use POSIX qw/strftime/;
  13. use open OUT => ':locale';
  14.  
  15. my ($s, $min, $h, $d, $m, $y) = localtime();
  16.  
  17. my $time = timelocal $s, $min, $h, $d, $m, $y;
  18. my $ano = strftime "%Y", localtime $time;
  19. my $today = strftime "%d de %m de %Y ", localtime $time;
  20.  
  21. print "<h1 style='text-align: center;'>Bienvenido a mi sitio !!</h1>\n";
  22. print "<br>\n";
  23. print "<h1 style='text-align: center; color: blue;'>$today (";
  24.  
  25. my $fecha = DateTime->new(year => $ano, month => $m+1, day => $d, locale => 'es_ES',);
  26.  
  27. print $fecha->day_abbr();
  28. print ")</h1>\n";
  29.  
  30. print "</body> </html>\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement