Guest User

Untitled

a guest
Jul 16th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.18 KB | None | 0 0
  1. use strict;
  2. use warnings;
  3.  
  4. use feature ':5.10';
  5.  
  6. sub factorial {
  7.     my $x = shift;
  8.     return 1 if $x == 0;
  9.     return $x * factorial( $x - 1 );
  10. }
  11.  
  12. say factorial(@ARGV);
Add Comment
Please, Sign In to add comment