=************************************** = Name: Factorial Program Using Functions in PERL = Description:A simple factorial program that uses Functions in Perl that will ask the user to give a number and then our program will compute the factorial value based on the given number by our user. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360. = By: Jake R. Pomperada = = = Inputs:None = = Returns:None = =Assumes:None = =Side Effects:None =************************************** #!D:\xampp\perl\bin sub factorial { my($num) = @_; if ($num == 1) { return 1; } else { return $num*factorial($num - 1); } } print "Factorial Program in Perl"; print "\n"; print "Enter a Number : "; $number = <>; chop ($number); print "\n"; print factorial($number);