Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #use Math::Round;
  2. use POSIX;
  3. use Win32;
  4.  
  5. use strict;
  6. use warnings;
  7.  
  8. my $basetime = 1484784000;
  9.  
  10. #code with POSIX
  11. my $days = floor((time()-$basetime) / 86400);
  12.  
  13. #code without POSIX
  14. #my $days = sprintf("%d", (time()-$basetime) / 86400);
  15.  
  16. #code with Math::Round
  17. #my $days = Math::Round::nearest_floor(1, (time()-$basetime) / 86400);
  18.  
  19. my $bigString = "We've been going for $days days.n";
  20.  
  21. Win32::MsgBox($bigString);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement