Guest User

Untitled

a guest
Nov 24th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use warnings;
  3.  
  4. while(1){
  5. #---------------------------
  6. $sec = (localtime)[0];
  7. $min = (localtime)[1];
  8. $ore = (localtime)[2];
  9. $giorno = (localtime)[3];
  10. $mese = (localtime)[4];
  11. $anno = (localtime)[5];
  12. $giornosettimana = (localtime)[6];
  13. $giornoanno = (localtime)[7];
  14. $oralegale = (localtime)[8];
  15. #----------------------------
  16.  
  17. $val= "$ore:$min:$sec";
  18.  
  19. if ($val =~ /1:25:00/i) {
  20.  
  21. print "sono le ore ke hai messo\n";
  22.  
  23. }
  24. if ($val=~ /1:26:00/i) {
  25.  
  26. print "sono le 4\n";
  27.  
  28. }
  29.  
  30. }
Add Comment
Please, Sign In to add comment