daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest Apr 3rd, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #perl 5.22.1
  2.  
  3. my $start = now;
  4.  
  5. sub div($a, $b){
  6.     my $r;
  7.     try {
  8.         $r = $a / $b;
  9.         CATCH {
  10.            print "Division por cero !";
  11.         }
  12.     }
  13.     return $r
  14. }
  15.  
  16.  
  17. (^100000).pick(1000);
  18. say now - $start;
  19. say div(100,0);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top